@wayai/cli 0.3.189 → 0.3.191
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 +225 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9380,7 +9380,7 @@ var init_chunk_XJDAH2N7 = __esm({
|
|
|
9380
9380
|
}
|
|
9381
9381
|
});
|
|
9382
9382
|
|
|
9383
|
-
// ../../packages/core/dist/chunk-
|
|
9383
|
+
// ../../packages/core/dist/chunk-AHLUSB6M.js
|
|
9384
9384
|
function refineLaneReferences(val, ctx) {
|
|
9385
9385
|
const lanes = val.lanes;
|
|
9386
9386
|
const statuses = val.kanban_statuses;
|
|
@@ -9416,9 +9416,9 @@ function refineScopedTarget(data, ctx) {
|
|
|
9416
9416
|
}
|
|
9417
9417
|
}
|
|
9418
9418
|
}
|
|
9419
|
-
var primaryRegionSchema, placementSourceSchema, orgIdParam, orgAdminIdParam, createOrganizationBody, updateOrganizationBody, addOrgAdminBody, hubIdParam, hubAdminIdParam, hubUserIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_RETENTION_DAYS, MAX_EVAL_RETENTION_DAYS, previewLabelField, createHubBody, updateHubBody, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, updateChannelTestIdentitiesBody, claimCodeChannelParam, claimCodeDeleteParam, connectionIdParam, connectorIdParam, listConnectionsQuery, deleteConnectionQuery, addConnectionBody, editConnectionBody, PRODUCTION_DIRECT_FIELDS, setProductionCredentialBody, registerWhatsappQuery, registerWhatsappBody, retryProvisioningQuery, resendDomainStatusQuery, initialValueCreateSchema, initialValueUpdateSchema, stateIdParam, listStatesQuery, stateNameSchema, createStateBody, updateStateBody, reorderStatesBody, variantAiModeSchema, experimentStatusSchema, overlayUpdateSchema, experimentIdParam, variantIdParam, listExperimentsQuery, listVariantsQuery, listOverridesQuery, deleteOverrideQuery, createExperimentBody, updateExperimentBody, setExperimentStatusBody, createVariantBody, updateVariantBody, upsertOverrideBody, orgTagIdParam, listOrgTagsQuery, ORG_TAG_NAME_REGEX, ORG_TAG_NAME_MAX_LENGTH, createOrgTagBody, updateOrgTagBody, orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody, BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, baseCredentialNameSchema, createBaseCredentialLinkBody, baseCredentialLinkParams, baseCredentialLinkQuery, orgResourceIdParam, orgResourceFileIdParam, orgResourceFolderIdParam, hubOrgResourceParam, listOrgResourcesQuery, orgIdQuery, createOrgResourceBody, updateOrgResourceBody, createOrgResourceFolderBody, updateOrgResourceFolderBody, uploadOrgResourceFileBody, updateOrgResourceFileBody, uploadOrgSkillZipBody, linkOrgResourceBody, resourceIdParam, listResourcesQuery, createResourceBody, updateResourceBody, syncSkillsBody, resourceFileIdParam, listResourceFilesQuery, createResourceFileBody, updateResourceFileBody, uploadResourceFileBody, uploadSkillZipBody, resourceFolderIdParam, listResourceFoldersQuery, createResourceFolderBody, updateResourceFolderBody, agentResourceQuery, hubResourceQuery, linkAgentResourceBody, updateAgentResourceBody, unlinkAgentResourceQuery, navItemSchema, hubCountResetBody, navItemCountResetBody, typingBody, analyticsHubIdParam, analyticsVariableIdParam, updateVariablePinBody, updateAnalyticsViewBody, NUMERIC_FILTER_OPS, TEXT_FILTER_OPS, CATEGORICAL_FILTER_OPS, VARIABLE_FILTER_OPS, STRUCTURED_QUERY_OPS, STRUCTURED_QUERY_AGGREGATIONS, filterValueSchema, conversationsBody, analyticsConversationIdParam, messagesQuery, conversationDetailDataQuery, analyticsDataBody, structuredQueryBody, analyticsSqlBody, analyticsSqlTable, analyticsSqlSchemaQuery, getConversationsQuery, getMessagesQuery, appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse, CALL_STATUSES, callStatus, CALL_END_REASONS, callEndReason, CALL_TRANSPORTS, callTransport, CALL_PARTICIPANT_TYPES, callParticipantType, callInstant, MAX_SDP_OFFER_LENGTH, sdpDescription, sdpOffer, MAX_CALL_REQUEST_BODY_BYTES, hubScoped, callSummaryFields, callSummary, callIdParam, createCallBody, createCallResponse, callReadyBody, callHangupBody, callStatusQuery, MAX_REPORTED_DELEGATION_IDS, callDelegationId, callDelegationsBody, callResponse, MAX_CALL_RECORDING_GAPS, callRecordingGap, callRecordingNoteMetadata, evalCallInstant, EVAL_CALL_MIN_SECONDS, EVAL_CALL_MAX_SECONDS, EVAL_CALL_SPOKEN_LINE_MAX_CHARS, hubScoped2, createEvalCallBody, createEvalCallResponse, evalCallConversationQuery, evalCallRecordQuery, evalCallSpeaker, evalCallUtterance, evalCallTurn, evalCallRecording, evalCallRecordResponse, evalCallFinishResponse, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, recordAiDisclosureAcceptanceBody, activityQuery, deletionModeSchema, deletionRequestBody, CACHE_RECONCILE_MAX_IDS, CACHE_RECONCILE_MAX_HUBS, cacheReconcileScopeSchema, cachedConversationPageSchema, cachedHistoryThreadSchema, cachedPeopleThreadSchema, cacheReconcileBody, archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams, conversationIdParam, conversationHubQuery, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody, copilotSuggestBody, copilotSuggestResponse, CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS, billingOrgIdParam, subscriptionItemParams, spendCapBody, growthPacksBody, portalSessionBody, checkoutSessionBody, updateBillingCurrencyBody, invoicesQuery, planKeySchema, billingStatusSchema, billingPlanTypeSchema, dataUsageCountersSchema, REKOR_ENTITLEMENT_CONTRACT_VERSION, entitlementProjectionSchema, rekorEntitlementRefreshMessageSchema, downloadBody, uploadQuery, SIGN_URL_MAX_EXPIRES_IN_SECONDS, signUrlBody, outboundSchemaQuery, templateIdParam, listTemplatesQuery, deleteTemplateQuery, templateStatusQuery, createTemplateBody, updateTemplateBody, submitTemplateBody, testTemplateBody, contactIdParam, listContactsQuery, createContactBody, updateContactBody, listIdParam, listListsQuery, listListContactsQuery, createListBody, updateListBody, addListContactsBody, removeListContactsBody, scheduleIdParam, listSchedulesQuery, listExecutionsQuery, createScheduleBody, updateScheduleBody, VERSION_PART, MOBILE_APP_VERSION_RE, mobileAppVersionSchema, MOBILE_PLATFORMS, mobilePlatformSchema, mobileVersionPolicyQuery, mobileVersionPolicySchema, mobileVersionPolicyResponse, adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, PRICING_PLAN_ID_RE, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, MAX_VOICE_CALL_MINUTE_OPS, voiceCallMinuteOps, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetShape, adminScopedTargetBody, BRANCHING_ORPHAN_ENTITY_TYPES, BRANCHING_ORPHAN_MAX_TARGETS, adminRepairBranchingOrphansBody, adminRepairLegacyOrgGrantsBody, adminRepairCompedPlansBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysBody, dataExplorerKvKeyBody, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteBody, pitrDoNamespace, pitrBookmarkParam, pitrRestoreBody, healthSamplingTriggerBody, dataExplorerDebugDoType, DEBUG_READ_MAX_LIMIT, DEBUG_READ_DEFAULT_LIMIT, DEBUG_DO_HEX_PREFIX, debugDoEntityId, debugTableName, dataExplorerDebugTablesParam, dataExplorerDebugRowsParam, dataExplorerDebugRowsQuery, dataExplorerDebugAnalyticsTable, debugUuid, dataExplorerDebugAnalyticsRowsParam, dataExplorerDebugAnalyticsRowsQuery, debugHubConvParam, debugMessageIdQuery, sandboxEgressPolicy, SANDBOX_EXEC_MAX_CMD_LENGTH, SANDBOX_EXEC_MAX_ALLOWLIST, SANDBOX_EXEC_MAX_TIMEOUT_MS, adminSandboxExecBody, META_ENTITY_ID_PATTERN, metaEntityId, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, passwordLoginBody, stateOperationBody, conversationListResourcesQuery, conversationReadResourceQuery, listPendingSchedulesQuery, listHubAggregateSchedulesQuery, reportSourceSchema, intakeReportSourceSchema, reportClassificationSchema, reportStatusSchema, reportLocaleSchema, reportMessageAuthorRoleSchema, reportMessageSchema, sentryRefStatusSchema, createReportBody, editReportBody, reporterReportSummarySchema, reporterListResponseSchema, getReportResponseSchema, reporterTransitionResponseSchema, contestReportBody, reporterListQuery, listReportsQuery, GITHUB_ISSUE_URL_REGEX, githubIssueUrlSchema, transitionReportBody, groupReportsBody, holdReportBody, clickhouseReadyResponse, bootstrapQuery, MAX_NAME_LENGTH, MAX_VALUE_LENGTH, MAX_TAGS, MAX_TAG_LENGTH, MAX_SCOPE_HUBS, MAX_SCOPE_TAGS, vaultSecretScopeSchema, vaultCreateBody, vaultUpdateBody, MAX_NAME_LENGTH2, MAX_HUBS_PER_GRANT, MAX_HUB_TAGS_PER_GRANT, MAX_GRANTS, permissionEnum, grantScopeSchema, grantSchema, createTokenBody, tokenOrgIdParam, invitePreviewQuery, inviteRolePreviewResponse, inviteContactPreviewResponse, invitePreviewResponse, inviteUnsubscribeBody, jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse, hubAlertsParam, hubAlertSeverity, hubAlert, hubAlertsListResponse, noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema, ADMIN_SKILL_NAME_REGEX, adminSkillNameParam, 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, DATA_PROXY_MOUNT, DATA_PROXY_PREFIX, REKOR_V1_PREFIX, DATA_PROXY_ORG_QUERY_PARAM, MAX_PROVISIONING_BODY_BYTES, dataProxyQuery, rekorAttestation, REQUIRED_REKOR_ATTESTATION_HEADERS, BASE_DESTRUCTION_MOUNT, BASE_DESTRUCTION_PREFIX, BASE_DESTRUCTION_CONFIRM_PATH, baseDestructionConfirmBody, BASE_DESTRUCTION_GRACE_MS, BASE_DESTRUCTION_CONFIRM_TTL_MS, BASE_DESTRUCTION_ORG_QUERY_PARAM, baseDestructionQuery, baseDestructionParam, baseDestructionInitiateBody, baseDestructionStatus, baseDestructionRequest, baseDestructionListResponse, baseDestructionInitiateResponse, baseDestructionConfirmResponse, baseDestructionCancelResponse, rekorBaseChangeMessageSchema, 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, PEOPLE_THREAD_MESSAGE_MAX_LENGTH, PEOPLE_THREAD_MESSAGES_PAGE_MAX, PEOPLE_THREAD_PAGE_MAX, PEOPLE_THREAD_PAGE_DEFAULT, PEOPLE_GROUP_NAME_MAX_LENGTH, PEOPLE_GROUP_AVATAR_URL_MAX_LENGTH, PEOPLE_THREAD_ATTACHMENT_MAX_BYTES, PEOPLE_THREAD_ATTACHMENT_NAME_MAX_LENGTH, PEOPLE_ATTACHMENT_STORAGE_PER_USER_BYTES, PEOPLE_THREAD_ATTACHMENT_MAX_MB, PEOPLE_THREAD_ATTACHMENT_URL_TTL_SECONDS, PEOPLE_THREAD_ATTACHMENT_URLS_MAX, peopleThreadIdParam, peopleThreadMessageIdParam, peopleThreadListQuery, peopleThreadMessagesQuery, peopleThreadAttachmentUploadSchema, peopleThreadSendBody, peopleThreadAttachmentUrlsBody, peopleThreadReadBody, peopleThreadSettingsBody, peopleGroupNameSchema, peopleGroupAvatarUrlSchema, peopleGroupCreateBody, peopleOrgDirectBody, peopleGroupUpdateBody, peopleGroupInviteBody, peopleOrgErasureBody, peopleGroupLeaveBody, peopleGroupInviteIdParam, peopleGroupIncomingInviteIdParam, peopleGroupMemberParam, peopleThreadKindSchema, peopleThreadMemberSchema, peopleThreadLastMessageSchema, peopleGroupRoleSchema, peopleGroupSummarySchema, peopleThreadSummarySchema, peopleThreadAttachmentSchema, peopleThreadMessageSchema, peopleGroupMemberSchema, peopleGroupSentInviteSchema, peopleGroupIncomingInviteSchema, PEOPLE_REPORT_DETAILS_MAX_LENGTH, peopleReportReasonSchema, reportDetailsSchema, reportFields, peopleReportBody, PEOPLE_MODERATION_NOTE_MAX_LENGTH, ADMIN_PEOPLE_REPORTS_PAGE_MAX, ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT, peopleModerationActionSchema, moderationNoteSchema, adminPeopleReportListQuery, adminPeopleReportIdParam, adminPeopleMessageRemovalBody, adminPeopleSuspendBody, adminPeopleNoteBody;
|
|
9420
|
-
var
|
|
9421
|
-
"../../packages/core/dist/chunk-
|
|
9419
|
+
var primaryRegionSchema, placementSourceSchema, orgIdParam, orgAdminIdParam, createOrganizationBody, updateOrganizationBody, addOrgAdminBody, hubIdParam, hubAdminIdParam, hubUserIdParam, hubIdentityIdParam, hubTeamIdParam, hubTeamUserDeleteParam, hubSchemaQuery, PREVIEW_LABEL_MAX_LENGTH, MAX_ENDED_INDEX_RETENTION_DAYS, MAX_EVAL_RETENTION_DAYS, previewLabelField, createHubBody, updateHubBody, addHubAdminBody, addHubIdentityAuthorizationBody, contactDecisionBody, approveContactBody, listContactAccessQuery, createHubTeamBody, updateHubTeamBody, addHubTeamUserBody, reassignHubUserBody, replicatePreviewBody, updateChannelTestIdentitiesBody, claimCodeChannelParam, claimCodeDeleteParam, connectionIdParam, connectorIdParam, listConnectionsQuery, deleteConnectionQuery, addConnectionBody, editConnectionBody, PRODUCTION_DIRECT_FIELDS, setProductionCredentialBody, registerWhatsappQuery, registerWhatsappBody, retryProvisioningQuery, resendDomainStatusQuery, initialValueCreateSchema, initialValueUpdateSchema, stateIdParam, listStatesQuery, stateNameSchema, createStateBody, updateStateBody, reorderStatesBody, variantAiModeSchema, experimentStatusSchema, overlayUpdateSchema, experimentIdParam, variantIdParam, listExperimentsQuery, listVariantsQuery, listOverridesQuery, deleteOverrideQuery, createExperimentBody, updateExperimentBody, setExperimentStatusBody, createVariantBody, updateVariantBody, upsertOverrideBody, orgTagIdParam, listOrgTagsQuery, ORG_TAG_NAME_REGEX, ORG_TAG_NAME_MAX_LENGTH, createOrgTagBody, updateOrgTagBody, orgCredentialIdParam, listOrgCredentialsQuery, createOrgCredentialBody, updateOrgCredentialBody, BASE_CREDENTIAL_MANAGED_BY, BASE_CREDENTIAL_NAME_MAX, baseCredentialNameSchema, createBaseCredentialLinkBody, baseCredentialLinkParams, baseCredentialLinkQuery, orgResourceIdParam, orgResourceFileIdParam, orgResourceFolderIdParam, hubOrgResourceParam, listOrgResourcesQuery, orgIdQuery, createOrgResourceBody, updateOrgResourceBody, createOrgResourceFolderBody, updateOrgResourceFolderBody, uploadOrgResourceFileBody, updateOrgResourceFileBody, uploadOrgSkillZipBody, linkOrgResourceBody, resourceIdParam, listResourcesQuery, createResourceBody, updateResourceBody, syncSkillsBody, resourceFileIdParam, listResourceFilesQuery, createResourceFileBody, updateResourceFileBody, uploadResourceFileBody, uploadSkillZipBody, resourceFolderIdParam, listResourceFoldersQuery, createResourceFolderBody, updateResourceFolderBody, agentResourceQuery, hubResourceQuery, linkAgentResourceBody, updateAgentResourceBody, unlinkAgentResourceQuery, navItemSchema, hubCountResetBody, navItemCountResetBody, typingBody, analyticsHubIdParam, analyticsVariableIdParam, updateVariablePinBody, updateAnalyticsViewBody, NUMERIC_FILTER_OPS, TEXT_FILTER_OPS, CATEGORICAL_FILTER_OPS, VARIABLE_FILTER_OPS, STRUCTURED_QUERY_OPS, STRUCTURED_QUERY_AGGREGATIONS, filterValueSchema, conversationsBody, analyticsConversationIdParam, messagesQuery, conversationDetailDataQuery, analyticsDataBody, structuredQueryBody, analyticsSqlBody, analyticsSqlTable, analyticsSqlSchemaQuery, getConversationsQuery, getMessagesQuery, appMessageSenderType, appMessageReceiverType, apiChannelMessage, apiChannelMessageBody, appMessageBody, appMessageResponse, CALL_STATUSES, callStatus, CALL_END_REASONS, callEndReason, CALL_TRANSPORTS, callTransport, CALL_PARTICIPANT_TYPES, callParticipantType, callInstant, MAX_SDP_OFFER_LENGTH, sdpDescription, sdpOffer, MAX_CALL_REQUEST_BODY_BYTES, hubScoped, callSummaryFields, callSummary, callIdParam, createCallBody, createCallResponse, callReadyBody, callHangupBody, callStatusQuery, MAX_REPORTED_DELEGATION_IDS, callDelegationId, callDelegationsBody, callResponse, MAX_CALL_RECORDING_GAPS, callRecordingGap, callRecordingNoteMetadata, evalCallInstant, EVAL_CALL_MIN_SECONDS, EVAL_CALL_MAX_SECONDS, EVAL_CALL_SPOKEN_LINE_MAX_CHARS, hubScoped2, createEvalCallBody, createEvalCallResponse, evalCallConversationQuery, evalCallRecordQuery, evalCallSpeaker, evalCallUtterance, evalCallTurn, evalCallRecording, evalCallRecordResponse, evalCallFinishResponse, updateUserBody, updateProfileBody, pathnameRegex, updatePreferencesBody, registerPushTokenBody, deletePushTokenQuery, recordAiDisclosureAcceptanceBody, activityQuery, deletionModeSchema, deletionRequestBody, CACHE_RECONCILE_MAX_IDS, CACHE_RECONCILE_MAX_HUBS, cacheReconcileScopeSchema, cachedConversationPageSchema, cachedHistoryThreadSchema, cachedPeopleThreadSchema, cacheReconcileBody, archiveHubIdParam, archiveConversationParams, archiveListQuery, archiveMessageObservabilityParams, conversationIdParam, conversationHubQuery, claimBody, releaseBody, transferBody, closeBody, additionalContextPayloadSchema, kanbanUpdateBody, annotateConversationBody, observabilityParams, observabilityListParams, deleteUserConversationsBody, deleteUserConversationsResponse, sendMessageBody, listConversationsQuery, flagSourceSchema, getConversationsResponse, getConversationDetailParams, getConversationDetailQuery, getConversationDetailResponse, listWhatsAppTemplatesQuery, sendWhatsAppTemplateBody, copilotSuggestBody, copilotSuggestResponse, CONSULT_THREAD_STATUSES, consultThreadStatus, CONSULT_THREAD_TITLE_MAX, consultThreadTitle, consultThreadSummary, listConsultThreadsQuery, listConsultThreadsResponse, createConsultThreadBody, createConsultThreadResponse, consultThreadIdParam, updateConsultThreadBody, updateConsultThreadResponse, CONSULT_AWAIT_TIMEOUT_MS, billingOrgIdParam, subscriptionItemParams, spendCapBody, growthPacksBody, portalSessionBody, checkoutSessionBody, updateBillingCurrencyBody, invoicesQuery, planKeySchema, billingStatusSchema, billingPlanTypeSchema, dataUsageCountersSchema, REKOR_ENTITLEMENT_CONTRACT_VERSION, entitlementProjectionSchema, rekorEntitlementRefreshMessageSchema, downloadBody, uploadQuery, SIGN_URL_MAX_EXPIRES_IN_SECONDS, signUrlBody, outboundSchemaQuery, templateIdParam, listTemplatesQuery, deleteTemplateQuery, templateStatusQuery, createTemplateBody, updateTemplateBody, submitTemplateBody, testTemplateBody, contactIdParam, listContactsQuery, createContactBody, updateContactBody, listIdParam, listListsQuery, listListContactsQuery, createListBody, updateListBody, addListContactsBody, removeListContactsBody, scheduleIdParam, listSchedulesQuery, listExecutionsQuery, createScheduleBody, updateScheduleBody, VERSION_PART, MOBILE_APP_VERSION_RE, mobileAppVersionSchema, MOBILE_PLATFORMS, mobilePlatformSchema, mobileVersionPolicyQuery, mobileVersionPolicySchema, mobileVersionPolicyResponse, adminOrgIdParam, adminOrgAdminIdParam, adminUserIdParam, PRICING_PLAN_ID_RE, adminPlanIdParam, adminOrganizationsQuery, adminUserSearchQuery, kanbanSlugMigrationQuery, adjustQuotaBody, updatePlanBody, addAdminUserBody, MAX_VOICE_CALL_MINUTE_OPS, voiceCallMinuteOps, updatePlatformConfigBody, updateFreeOrgLimitBody, adminScopedTargetShape, adminScopedTargetBody, BRANCHING_ORPHAN_ENTITY_TYPES, BRANCHING_ORPHAN_MAX_TARGETS, adminRepairBranchingOrphansBody, adminRepairLegacyOrgGrantsBody, adminRepairCompedPlansBody, updatePricingPlanBody, dataExplorerSearchQuery, dataExplorerOrgIdParam, dataExplorerHubIdParam, dataExplorerConvIdParam, dataExplorerDoInstancesQuery, dataExplorerNsIdParam, dataExplorerKvKeysBody, dataExplorerKvKeyBody, uuidOrHexId, dataExplorerDeleteOrgParam, dataExplorerDeleteHubParam, dataExplorerDeleteConvParam, dataExplorerDeleteUserParam, dataExplorerDeleteQuery, dataExplorerKvDeleteBody, pitrDoNamespace, pitrBookmarkParam, pitrRestoreBody, healthSamplingTriggerBody, dataExplorerDebugDoType, DEBUG_READ_MAX_LIMIT, DEBUG_READ_DEFAULT_LIMIT, DEBUG_DO_HEX_PREFIX, debugDoEntityId, debugTableName, dataExplorerDebugTablesParam, dataExplorerDebugRowsParam, dataExplorerDebugRowsQuery, dataExplorerDebugAnalyticsTable, debugUuid, dataExplorerDebugAnalyticsRowsParam, dataExplorerDebugAnalyticsRowsQuery, debugHubConvParam, debugMessageIdQuery, sandboxEgressPolicy, SANDBOX_EXEC_MAX_CMD_LENGTH, SANDBOX_EXEC_MAX_ALLOWLIST, SANDBOX_EXEC_MAX_TIMEOUT_MS, adminSandboxExecBody, META_ENTITY_ID_PATTERN, metaEntityId, whatsappCallbackBody, authMeResponse, wsTicketResponse, sessionCheckResponse, logoutResponse, magicCodeSendBody, magicCodeSendResponse, magicCodeVerifyBody, magicCodeVerifyResponse, passwordLoginBody, stateOperationBody, conversationListResourcesQuery, conversationReadResourceQuery, listPendingSchedulesQuery, listHubAggregateSchedulesQuery, reportSourceSchema, intakeReportSourceSchema, reportClassificationSchema, reportStatusSchema, reportLocaleSchema, reportMessageAuthorRoleSchema, reportMessageSchema, sentryRefStatusSchema, createReportBody, editReportBody, reporterReportSummarySchema, reporterListResponseSchema, getReportResponseSchema, reporterTransitionResponseSchema, contestReportBody, reporterListQuery, listReportsQuery, GITHUB_ISSUE_URL_REGEX, githubIssueUrlSchema, transitionReportBody, groupReportsBody, holdReportBody, clickhouseReadyResponse, bootstrapQuery, MAX_NAME_LENGTH, MAX_VALUE_LENGTH, MAX_TAGS, MAX_TAG_LENGTH, MAX_SCOPE_HUBS, MAX_SCOPE_TAGS, vaultSecretScopeSchema, vaultCreateBody, vaultUpdateBody, MAX_NAME_LENGTH2, MAX_HUBS_PER_GRANT, MAX_HUB_TAGS_PER_GRANT, MAX_GRANTS, permissionEnum, grantScopeSchema, grantSchema, createTokenBody, tokenOrgIdParam, invitePreviewQuery, inviteRolePreviewResponse, inviteContactPreviewResponse, invitePreviewResponse, inviteUnsubscribeBody, jsonSchemaSchema, hubUserIdentity, stateValueEntry, getHubUserContextResponse, updateHubUserBody, updateHubUserResponse, unlockHubUserNameResponse, stateResetParams, stateResetResponse, hubAlertsParam, hubAlertSeverity, hubAlert, hubAlertsListResponse, noticeSeveritySchema, noticeStatusSchema, NOTICE_SCOPE_REGEX, noticeScopeSchema, noticeLinkSchema, createNoticeBody, updateNoticeBody, listNoticesQuery, noticeIdParamSchema, ADMIN_SKILL_NAME_REGEX, adminSkillNameParam, 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, DATA_PROXY_MOUNT, DATA_PROXY_PREFIX, REKOR_V1_PREFIX, DATA_PROXY_ORG_QUERY_PARAM, MAX_PROVISIONING_BODY_BYTES, dataProxyQuery, rekorAttestation, REQUIRED_REKOR_ATTESTATION_HEADERS, BASE_DESTRUCTION_MOUNT, BASE_DESTRUCTION_PREFIX, BASE_DESTRUCTION_CONFIRM_PATH, baseDestructionConfirmBody, BASE_DESTRUCTION_GRACE_MS, BASE_DESTRUCTION_CONFIRM_TTL_MS, BASE_DESTRUCTION_ORG_QUERY_PARAM, baseDestructionQuery, baseDestructionParam, baseDestructionInitiateBody, baseDestructionStatus, baseDestructionRequest, baseDestructionListResponse, baseDestructionInitiateResponse, baseDestructionConfirmResponse, baseDestructionCancelResponse, rekorBaseChangeMessageSchema, 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, PEOPLE_THREAD_MESSAGE_MAX_LENGTH, PEOPLE_THREAD_MESSAGES_PAGE_MAX, PEOPLE_THREAD_PAGE_MAX, PEOPLE_THREAD_PAGE_DEFAULT, PEOPLE_GROUP_NAME_MAX_LENGTH, PEOPLE_GROUP_AVATAR_URL_MAX_LENGTH, PEOPLE_THREAD_ATTACHMENT_MAX_BYTES, PEOPLE_THREAD_ATTACHMENT_NAME_MAX_LENGTH, PEOPLE_ATTACHMENT_STORAGE_PER_USER_BYTES, PEOPLE_THREAD_ATTACHMENT_MAX_MB, PEOPLE_THREAD_ATTACHMENT_URL_TTL_SECONDS, PEOPLE_THREAD_ATTACHMENT_URLS_MAX, peopleThreadIdParam, peopleThreadMessageIdParam, peopleThreadListQuery, peopleThreadMessagesQuery, peopleThreadAttachmentUploadSchema, peopleThreadSendBody, peopleThreadAttachmentUrlsBody, peopleThreadReadBody, peopleThreadSettingsBody, peopleGroupNameSchema, peopleGroupAvatarUrlSchema, peopleGroupCreateBody, peopleOrgDirectBody, peopleGroupUpdateBody, peopleGroupInviteBody, peopleOrgErasureBody, peopleGroupLeaveBody, peopleGroupInviteIdParam, peopleGroupIncomingInviteIdParam, peopleGroupMemberParam, peopleThreadKindSchema, peopleThreadMemberSchema, peopleThreadLastMessageSchema, peopleGroupRoleSchema, peopleGroupSummarySchema, peopleThreadSummarySchema, peopleThreadAttachmentSchema, peopleThreadMessageSchema, peopleGroupMemberSchema, peopleGroupSentInviteSchema, peopleGroupIncomingInviteSchema, PEOPLE_REPORT_DETAILS_MAX_LENGTH, peopleReportReasonSchema, reportDetailsSchema, reportFields, peopleReportBody, PEOPLE_MODERATION_NOTE_MAX_LENGTH, ADMIN_PEOPLE_REPORTS_PAGE_MAX, ADMIN_PEOPLE_REPORTS_PAGE_DEFAULT, peopleModerationActionSchema, moderationNoteSchema, adminPeopleReportListQuery, adminPeopleReportIdParam, adminPeopleMessageRemovalBody, adminPeopleSuspendBody, adminPeopleNoteBody, COMMUNITIES_PER_ORG_MAX, COMMUNITY_NAME_MAX_LENGTH, COMMUNITY_REGISTRY_CLOSED_REASON, COMMUNITY_JOIN_SOURCE_MAX_LENGTH, COMMUNITY_JOIN_FLOW_TOKEN_MAX_LENGTH, communityNameSchema, adminCreateCommunityBody, communityIdParam, communityJoinTokenSchema, communityJoinSourceSchema, communityJoinPreviewQuery, communityJoinBody;
|
|
9420
|
+
var init_chunk_AHLUSB6M = __esm({
|
|
9421
|
+
"../../packages/core/dist/chunk-AHLUSB6M.js"() {
|
|
9422
9422
|
"use strict";
|
|
9423
9423
|
init_chunk_FJKE7WIF();
|
|
9424
9424
|
init_chunk_IYXLMIWU();
|
|
@@ -9478,6 +9478,7 @@ var init_chunk_5SHGSEVN = __esm({
|
|
|
9478
9478
|
init_zod();
|
|
9479
9479
|
init_zod();
|
|
9480
9480
|
init_zod();
|
|
9481
|
+
init_zod();
|
|
9481
9482
|
primaryRegionSchema = external_exports.enum([
|
|
9482
9483
|
"wnam",
|
|
9483
9484
|
"enam",
|
|
@@ -11430,6 +11431,12 @@ var init_chunk_5SHGSEVN = __esm({
|
|
|
11430
11431
|
* `wayai admin threads enable|disable` flips this.
|
|
11431
11432
|
*/
|
|
11432
11433
|
threads_enabled: external_exports.number().int().min(0).max(1).optional(),
|
|
11434
|
+
/**
|
|
11435
|
+
* The communities kill switch (gh #4872, Decision 14). 0 = off (the default), 1 = on. The
|
|
11436
|
+
* community member surface is open only while this AND `threads_enabled` are on.
|
|
11437
|
+
* `wayai admin communities enable|disable` flips this.
|
|
11438
|
+
*/
|
|
11439
|
+
communities_enabled: external_exports.number().int().min(0).max(1).optional(),
|
|
11433
11440
|
/**
|
|
11434
11441
|
* The mobile app version policy (`MOBILE_VERSION_POLICY_COLUMNS`), per platform: an install
|
|
11435
11442
|
* below the minimum is blocked until it updates from the store; one below the recommended
|
|
@@ -11582,7 +11589,7 @@ var init_chunk_5SHGSEVN = __esm({
|
|
|
11582
11589
|
/** Filter to specific DO types (default: all) */
|
|
11583
11590
|
do_types: external_exports.array(pitrDoNamespace).optional()
|
|
11584
11591
|
});
|
|
11585
|
-
dataExplorerDebugDoType = external_exports.enum(["hub", "org", "conversation", "user", "platform", "thread"]);
|
|
11592
|
+
dataExplorerDebugDoType = external_exports.enum(["hub", "org", "conversation", "user", "platform", "thread", "community"]);
|
|
11586
11593
|
DEBUG_READ_MAX_LIMIT = 100;
|
|
11587
11594
|
DEBUG_READ_DEFAULT_LIMIT = 20;
|
|
11588
11595
|
DEBUG_DO_HEX_PREFIX = "hex:";
|
|
@@ -12326,7 +12333,8 @@ var init_chunk_5SHGSEVN = __esm({
|
|
|
12326
12333
|
muted: external_exports.boolean(),
|
|
12327
12334
|
hidden: external_exports.boolean(),
|
|
12328
12335
|
writable: external_exports.boolean(),
|
|
12329
|
-
group: peopleGroupSummarySchema.nullable().optional()
|
|
12336
|
+
group: peopleGroupSummarySchema.nullable().optional(),
|
|
12337
|
+
version: external_exports.number().int().nonnegative().optional()
|
|
12330
12338
|
}).strict();
|
|
12331
12339
|
peopleThreadAttachmentSchema = external_exports.object({
|
|
12332
12340
|
attachment_id: uuidSchema,
|
|
@@ -12389,6 +12397,22 @@ var init_chunk_5SHGSEVN = __esm({
|
|
|
12389
12397
|
adminPeopleMessageRemovalBody = external_exports.object({ report_id: uuidSchema, message_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
|
|
12390
12398
|
adminPeopleSuspendBody = external_exports.object({ report_id: uuidSchema.optional(), note: moderationNoteSchema }).strict();
|
|
12391
12399
|
adminPeopleNoteBody = external_exports.object({ note: moderationNoteSchema }).strict();
|
|
12400
|
+
COMMUNITIES_PER_ORG_MAX = 10;
|
|
12401
|
+
COMMUNITY_NAME_MAX_LENGTH = 100;
|
|
12402
|
+
COMMUNITY_REGISTRY_CLOSED_REASON = "community_registry_closed";
|
|
12403
|
+
COMMUNITY_JOIN_SOURCE_MAX_LENGTH = 32;
|
|
12404
|
+
COMMUNITY_JOIN_FLOW_TOKEN_MAX_LENGTH = 128;
|
|
12405
|
+
communityNameSchema = external_exports.string().trim().min(1).max(COMMUNITY_NAME_MAX_LENGTH);
|
|
12406
|
+
adminCreateCommunityBody = external_exports.object({ org_id: uuidSchema, name: communityNameSchema }).strict();
|
|
12407
|
+
communityIdParam = external_exports.object({ communityId: uuidSchema });
|
|
12408
|
+
communityJoinTokenSchema = external_exports.string().regex(/^[0-9a-f]{32}$/);
|
|
12409
|
+
communityJoinSourceSchema = external_exports.string().regex(new RegExp(`^[a-z0-9_-]{1,${COMMUNITY_JOIN_SOURCE_MAX_LENGTH}}$`));
|
|
12410
|
+
communityJoinPreviewQuery = external_exports.object({ c: uuidSchema, k: communityJoinTokenSchema });
|
|
12411
|
+
communityJoinBody = external_exports.object({
|
|
12412
|
+
token: communityJoinTokenSchema,
|
|
12413
|
+
src: communityJoinSourceSchema.optional(),
|
|
12414
|
+
flow_token: external_exports.string().max(COMMUNITY_JOIN_FLOW_TOKEN_MAX_LENGTH).optional()
|
|
12415
|
+
}).strict();
|
|
12392
12416
|
}
|
|
12393
12417
|
});
|
|
12394
12418
|
|
|
@@ -12491,7 +12515,7 @@ var init_chunk_R5WRRHCL = __esm({
|
|
|
12491
12515
|
var init_contracts = __esm({
|
|
12492
12516
|
"../../packages/core/dist/contracts/index.js"() {
|
|
12493
12517
|
"use strict";
|
|
12494
|
-
|
|
12518
|
+
init_chunk_AHLUSB6M();
|
|
12495
12519
|
init_chunk_FJKE7WIF();
|
|
12496
12520
|
init_chunk_IYXLMIWU();
|
|
12497
12521
|
init_chunk_YX7EL2HJ();
|
|
@@ -12669,6 +12693,16 @@ var init_api_client = __esm({
|
|
|
12669
12693
|
async adminUpdateConfig(body) {
|
|
12670
12694
|
return this.request("PATCH", "/api/admin/config", body);
|
|
12671
12695
|
}
|
|
12696
|
+
// Create an org-owned community (platform-admin gated, gh #4872). Used by
|
|
12697
|
+
// `wayai admin communities create`.
|
|
12698
|
+
async adminCreateCommunity(body) {
|
|
12699
|
+
return this.request("POST", "/api/admin/communities", body);
|
|
12700
|
+
}
|
|
12701
|
+
// Destroy an org-owned community (platform-admin gated, gh #4872). Used by
|
|
12702
|
+
// `wayai admin communities destroy`.
|
|
12703
|
+
async adminDestroyCommunity(communityId) {
|
|
12704
|
+
return this.request("DELETE", `/api/admin/communities/${encodeURIComponent(communityId)}`);
|
|
12705
|
+
}
|
|
12672
12706
|
/**
|
|
12673
12707
|
* Re-discover an MCP connection's tool/resource catalog (refreshes stale
|
|
12674
12708
|
* input schemas that `push` leaves untouched). `connection` is the display
|
|
@@ -13803,7 +13837,7 @@ var ENDPOINT_CONFIGS, WAYAI_WORKSPACE_LAYOUT;
|
|
|
13803
13837
|
var init_dist = __esm({
|
|
13804
13838
|
"../../packages/core/dist/index.js"() {
|
|
13805
13839
|
"use strict";
|
|
13806
|
-
|
|
13840
|
+
init_chunk_AHLUSB6M();
|
|
13807
13841
|
init_chunk_FJKE7WIF();
|
|
13808
13842
|
init_chunk_IYXLMIWU();
|
|
13809
13843
|
init_chunk_YX7EL2HJ();
|
|
@@ -14207,6 +14241,20 @@ var init_dist = __esm({
|
|
|
14207
14241
|
skipAuthenticatedUsers: true,
|
|
14208
14242
|
userLimitKey: "/api/threads/reports"
|
|
14209
14243
|
},
|
|
14244
|
+
// Communities (gh #4872, `routes/api/communities`): join, leave and the org admins' join link
|
|
14245
|
+
// share one per-user budget. Every caller is signed in, so the per-IP tier is skipped; the key
|
|
14246
|
+
// is pinned because the paths carry community ids.
|
|
14247
|
+
"/api/communities/*": {
|
|
14248
|
+
tier: "STANDARD",
|
|
14249
|
+
userLimit: 60,
|
|
14250
|
+
skipAuthenticatedUsers: true,
|
|
14251
|
+
userLimitKey: "/api/communities/*"
|
|
14252
|
+
},
|
|
14253
|
+
// The join page's preview of a link — public, fetched from the visitor's browser, so this
|
|
14254
|
+
// per-IP limit is its one bound and runs before the route reads anything (#4872
|
|
14255
|
+
// owner-delegated decision 9). MODERATE (30/min per IP) leaves room for reloads and several
|
|
14256
|
+
// tabs. An exact key, so it wins over the wildcard above.
|
|
14257
|
+
"/api/communities/join-preview": { tier: "MODERATE" },
|
|
14210
14258
|
// App channel - high throughput with user limits
|
|
14211
14259
|
"/channels/app/*": { tier: "HIGH", userLimit: 500, skipAuthenticatedUsers: true },
|
|
14212
14260
|
// API channel (api-channel-connector) - machine-to-machine, high throughput
|
|
@@ -27670,6 +27718,32 @@ async function adminCommand(args2) {
|
|
|
27670
27718
|
process.exit(1);
|
|
27671
27719
|
}
|
|
27672
27720
|
}
|
|
27721
|
+
if (group === "communities") {
|
|
27722
|
+
if (!sub) {
|
|
27723
|
+
printHelp2();
|
|
27724
|
+
process.exit(1);
|
|
27725
|
+
}
|
|
27726
|
+
switch (sub) {
|
|
27727
|
+
case "enable":
|
|
27728
|
+
await runCommunitiesToggle(true, flagArgs);
|
|
27729
|
+
return;
|
|
27730
|
+
case "disable":
|
|
27731
|
+
await runCommunitiesToggle(false, flagArgs);
|
|
27732
|
+
return;
|
|
27733
|
+
case "status":
|
|
27734
|
+
await runPlatformGateStatus(COMMUNITIES_GATE, flagArgs);
|
|
27735
|
+
return;
|
|
27736
|
+
case "create":
|
|
27737
|
+
await runCommunitiesCreate(flagArgs);
|
|
27738
|
+
return;
|
|
27739
|
+
case "destroy":
|
|
27740
|
+
await runCommunitiesDestroy(positional, flagArgs);
|
|
27741
|
+
return;
|
|
27742
|
+
default:
|
|
27743
|
+
printHelp2();
|
|
27744
|
+
process.exit(1);
|
|
27745
|
+
}
|
|
27746
|
+
}
|
|
27673
27747
|
if (group === "voice-calls") {
|
|
27674
27748
|
if (!sub) {
|
|
27675
27749
|
printHelp2();
|
|
@@ -28469,6 +28543,127 @@ async function runThreadsToggle(enable, flagArgs) {
|
|
|
28469
28543
|
}
|
|
28470
28544
|
console.log(PLATFORM_CONFIG_PROPAGATION_NOTE);
|
|
28471
28545
|
}
|
|
28546
|
+
async function runCommunitiesToggle(enable, flagArgs) {
|
|
28547
|
+
await runPlatformGateToggle(COMMUNITIES_GATE, enable, flagArgs);
|
|
28548
|
+
if (enable) {
|
|
28549
|
+
console.log("Members reach their communities while the threads switch (`wayai admin threads status`) is on too.");
|
|
28550
|
+
} else {
|
|
28551
|
+
console.log("No member reaches a community; platform admins still create them.");
|
|
28552
|
+
}
|
|
28553
|
+
console.log(PLATFORM_CONFIG_PROPAGATION_NOTE);
|
|
28554
|
+
}
|
|
28555
|
+
async function runCommunitiesCreate(flagArgs) {
|
|
28556
|
+
const usage3 = "wayai admin communities create --org <org_id> --name <name> [--json]";
|
|
28557
|
+
let orgId;
|
|
28558
|
+
let name;
|
|
28559
|
+
let jsonOutput = false;
|
|
28560
|
+
for (let i = 0; i < flagArgs.length; i++) {
|
|
28561
|
+
const flag = flagArgs[i];
|
|
28562
|
+
if (flag === "--org") {
|
|
28563
|
+
orgId = requireFlagValue(flagArgs, i + 1, "--org");
|
|
28564
|
+
i++;
|
|
28565
|
+
} else if (flag === "--name") {
|
|
28566
|
+
name = requireFlagValue(flagArgs, i + 1, "--name");
|
|
28567
|
+
i++;
|
|
28568
|
+
} else if (flag === "--json") {
|
|
28569
|
+
jsonOutput = true;
|
|
28570
|
+
} else {
|
|
28571
|
+
console.error(`Unknown flag: ${flag}`);
|
|
28572
|
+
console.error(usage3);
|
|
28573
|
+
process.exit(1);
|
|
28574
|
+
}
|
|
28575
|
+
}
|
|
28576
|
+
const parsed = adminCreateCommunityBody.safeParse({ org_id: orgId, name });
|
|
28577
|
+
if (!parsed.success) {
|
|
28578
|
+
console.error(parsed.error.issues.map((issue) => `--${issue.path[0] === "org_id" ? "org" : issue.path[0]}: ${issue.message}`).join("\n"));
|
|
28579
|
+
console.error(usage3);
|
|
28580
|
+
process.exit(1);
|
|
28581
|
+
}
|
|
28582
|
+
const { config, accessToken } = await requireAuth();
|
|
28583
|
+
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
28584
|
+
let data;
|
|
28585
|
+
try {
|
|
28586
|
+
data = (await client.adminCreateCommunity(parsed.data)).data;
|
|
28587
|
+
} catch (err) {
|
|
28588
|
+
if (err instanceof ApiError && err.status === 404) {
|
|
28589
|
+
console.error(`Organization ${parsed.data.org_id} not found.`);
|
|
28590
|
+
process.exit(1);
|
|
28591
|
+
}
|
|
28592
|
+
if (err instanceof ApiError && err.status === 409) {
|
|
28593
|
+
console.error(conflictReasonOf(err) === COMMUNITY_REGISTRY_CLOSED_REASON ? `A deletion of organization ${parsed.data.org_id} closed it to new communities.` : `The organization already owns ${COMMUNITIES_PER_ORG_MAX} communities, the most it may.`);
|
|
28594
|
+
process.exit(1);
|
|
28595
|
+
}
|
|
28596
|
+
if (err instanceof ApiError && err.status === 503) {
|
|
28597
|
+
console.error("The community was not created in time. Run the command again.");
|
|
28598
|
+
process.exit(1);
|
|
28599
|
+
}
|
|
28600
|
+
exitOnApiError(err);
|
|
28601
|
+
throw err;
|
|
28602
|
+
}
|
|
28603
|
+
if (jsonOutput) {
|
|
28604
|
+
console.log(JSON.stringify(data, null, 2));
|
|
28605
|
+
return;
|
|
28606
|
+
}
|
|
28607
|
+
console.log(`Created community ${data.community_id} \u2014 "${data.name}", owned by ${data.org_name} (${data.org_id}).`);
|
|
28608
|
+
}
|
|
28609
|
+
async function runCommunitiesDestroy(positional, flagArgs) {
|
|
28610
|
+
const usage3 = "wayai admin communities destroy <community_id> [--yes] [--json]";
|
|
28611
|
+
let yes = false;
|
|
28612
|
+
let jsonOutput = false;
|
|
28613
|
+
for (const flag of flagArgs) {
|
|
28614
|
+
if (flag === "--yes") {
|
|
28615
|
+
yes = true;
|
|
28616
|
+
} else if (flag === "--json") {
|
|
28617
|
+
jsonOutput = true;
|
|
28618
|
+
} else {
|
|
28619
|
+
console.error(`Unknown flag: ${flag}`);
|
|
28620
|
+
console.error(usage3);
|
|
28621
|
+
process.exit(1);
|
|
28622
|
+
}
|
|
28623
|
+
}
|
|
28624
|
+
const parsed = communityIdParam.safeParse({ communityId: positional[0] });
|
|
28625
|
+
if (positional.length !== 1 || !parsed.success) {
|
|
28626
|
+
console.error("<community_id> must be one community id (a UUID).");
|
|
28627
|
+
console.error(usage3);
|
|
28628
|
+
process.exit(1);
|
|
28629
|
+
}
|
|
28630
|
+
const { communityId } = parsed.data;
|
|
28631
|
+
if (!yes && !jsonOutput) {
|
|
28632
|
+
console.log(`About to destroy community ${communityId}: no one can read, join or leave it again,`);
|
|
28633
|
+
console.log("its members' lists drop it, and its storage is deleted. This cannot be undone.");
|
|
28634
|
+
const ok = await confirm("Proceed?");
|
|
28635
|
+
if (!ok) {
|
|
28636
|
+
console.log("Aborted.");
|
|
28637
|
+
return;
|
|
28638
|
+
}
|
|
28639
|
+
}
|
|
28640
|
+
const { config, accessToken } = await requireAuth();
|
|
28641
|
+
const client = new ApiClient({ apiUrl: config.api_url, accessToken });
|
|
28642
|
+
let data;
|
|
28643
|
+
try {
|
|
28644
|
+
data = (await client.adminDestroyCommunity(communityId)).data;
|
|
28645
|
+
} catch (err) {
|
|
28646
|
+
if (err instanceof ApiError && err.status === 404) {
|
|
28647
|
+
console.error(`Community ${communityId} not found (never created, or already destroyed).`);
|
|
28648
|
+
process.exit(1);
|
|
28649
|
+
}
|
|
28650
|
+
exitOnApiError(err);
|
|
28651
|
+
throw err;
|
|
28652
|
+
}
|
|
28653
|
+
if (jsonOutput) {
|
|
28654
|
+
console.log(JSON.stringify(data, null, 2));
|
|
28655
|
+
return;
|
|
28656
|
+
}
|
|
28657
|
+
console.log(`Destroyed community ${data.community_id} \u2014 "${data.name}", owned by ${data.org_name} (${data.org_id}), at ${data.destroyed_at}.`);
|
|
28658
|
+
}
|
|
28659
|
+
function conflictReasonOf(err) {
|
|
28660
|
+
try {
|
|
28661
|
+
const reason = JSON.parse(err.body).details?.reason;
|
|
28662
|
+
return typeof reason === "string" ? reason : null;
|
|
28663
|
+
} catch {
|
|
28664
|
+
return null;
|
|
28665
|
+
}
|
|
28666
|
+
}
|
|
28472
28667
|
function requireFlagValue(flagArgs, index, flag) {
|
|
28473
28668
|
const v = flagArgs[index];
|
|
28474
28669
|
if (v === void 0 || v === "" || v.startsWith("--")) {
|
|
@@ -29071,6 +29266,14 @@ Usage:
|
|
|
29071
29266
|
wayai admin threads disable Flip it OFF: every /api/contacts route answers 404
|
|
29072
29267
|
wayai admin threads status Print the kill switch
|
|
29073
29268
|
|
|
29269
|
+
wayai admin communities enable Flip the platform communities_enabled kill switch ON (members reach communities while threads is ON too)
|
|
29270
|
+
wayai admin communities disable Flip it OFF: no member reaches a community
|
|
29271
|
+
wayai admin communities status Print the kill switch
|
|
29272
|
+
wayai admin communities create --org <org_id> --name <name> [--json]
|
|
29273
|
+
Create a community owned by the org (at most ${COMMUNITIES_PER_ORG_MAX} per org); works while the switch is OFF
|
|
29274
|
+
wayai admin communities destroy <community_id> [--yes] [--json]
|
|
29275
|
+
Destroy a community: its members' lists drop it and its storage is deleted (DESTRUCTIVE; confirms unless --yes)
|
|
29276
|
+
|
|
29074
29277
|
Sources:
|
|
29075
29278
|
do Live DO SQLite (existing conversation, hub config, etc.).
|
|
29076
29279
|
analytics ClickHouse projections (conversation, message, schedule_event).
|
|
@@ -29154,12 +29357,18 @@ Sources:
|
|
|
29154
29357
|
(\`enable\`/\`disable\`) for contacts, direct messages and groups between
|
|
29155
29358
|
people. Off, every /api/contacts route answers 404. Changes land within
|
|
29156
29359
|
about 60 s.
|
|
29360
|
+
communities Org-owned communities. \`enable\`/\`disable\` flip the PLATFORM-wide
|
|
29361
|
+
communities_enabled switch, default-deny and nested in threads: members
|
|
29362
|
+
reach a community only while both switches are on. \`create\` makes a
|
|
29363
|
+
community for an org and \`destroy\` removes one, whichever way the switch
|
|
29364
|
+
is set; deleting an org destroys its communities too. Changes to the
|
|
29365
|
+
switch land within about 60 s.
|
|
29157
29366
|
|
|
29158
29367
|
Types (do): ${VALID_TYPES.join(" | ")}
|
|
29159
29368
|
Tables (analytics): ${VALID_ANALYTICS_TABLES.join(" | ")}
|
|
29160
29369
|
|
|
29161
29370
|
Entity id forms (do):
|
|
29162
|
-
<uuid> Domain entity id (hub_id, org_id, conversation_id, user_id, thread_id) \u2014
|
|
29371
|
+
<uuid> Domain entity id (hub_id, org_id, conversation_id, user_id, thread_id, community_id) \u2014
|
|
29163
29372
|
hashed via idFromName, same path as every other route.
|
|
29164
29373
|
hex:<64-hex> Raw CF DO hex id \u2014 resolved via idFromString. Use when you
|
|
29165
29374
|
only have the CF-level id (e.g. from orphan-audit logs, CF
|
|
@@ -29192,7 +29401,7 @@ Audit + rate limit:
|
|
|
29192
29401
|
across all sources. Platform-admin grant required.
|
|
29193
29402
|
`.trim());
|
|
29194
29403
|
}
|
|
29195
|
-
var VALID_TYPES, VALID_ANALYTICS_TABLES, HARNESS_GATE, VOICE_CALLS_GATE, THREADS_GATE, PLATFORM_CONFIG_PROPAGATION_NOTE, VALID_NOTICE_SEVERITIES;
|
|
29404
|
+
var VALID_TYPES, VALID_ANALYTICS_TABLES, HARNESS_GATE, VOICE_CALLS_GATE, THREADS_GATE, COMMUNITIES_GATE, PLATFORM_CONFIG_PROPAGATION_NOTE, VALID_NOTICE_SEVERITIES;
|
|
29196
29405
|
var init_admin = __esm({
|
|
29197
29406
|
"src/commands/admin.ts"() {
|
|
29198
29407
|
"use strict";
|
|
@@ -29225,6 +29434,12 @@ var init_admin = __esm({
|
|
|
29225
29434
|
label: "threads kill switch",
|
|
29226
29435
|
displayName: "Threads"
|
|
29227
29436
|
};
|
|
29437
|
+
COMMUNITIES_GATE = {
|
|
29438
|
+
group: "communities",
|
|
29439
|
+
key: "communities_enabled",
|
|
29440
|
+
label: "communities kill switch",
|
|
29441
|
+
displayName: "Communities"
|
|
29442
|
+
};
|
|
29228
29443
|
PLATFORM_CONFIG_PROPAGATION_NOTE = "Takes effect within about 60 s (the platform-config cache is dropped; KV deletes propagate eventually).";
|
|
29229
29444
|
VALID_NOTICE_SEVERITIES = ["critical", "warn", "info"];
|
|
29230
29445
|
}
|