@domino-sdk/relay 1.21.0 → 1.23.0
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/accounts-B31dWEYD.d.ts +292 -0
- package/dist/{attempt-captures-ByzZyggX.d.ts → attempt-captures-JDIgz2lY.d.ts} +1 -1
- package/dist/authoring.d.ts +112 -49
- package/dist/authoring.js +37 -3
- package/dist/{automatic-outcomes-BBSdMf0R.d.ts → automatic-outcomes-T9lEIvTj.d.ts} +1 -1
- package/dist/browser.d.ts +8 -8
- package/dist/browser.js +10 -9
- package/dist/{chunk-WQT4H2PI.js → chunk-57KARWUC.js} +1 -1
- package/dist/{chunk-EMLDFUTV.js → chunk-6UFXPKLA.js} +6 -1
- package/dist/{chunk-GMKJPHN4.js → chunk-AXQYGVOP.js} +1 -1
- package/dist/{chunk-JIQHUDVZ.js → chunk-B4EZ76WX.js} +1 -1
- package/dist/{chunk-T47OFHHX.js → chunk-E7MVYASS.js} +1 -1
- package/dist/{chunk-CVQG2AZZ.js → chunk-ENBQ6UEE.js} +2 -2
- package/dist/{chunk-NGP2NMZ4.js → chunk-G75JVB4D.js} +1 -1
- package/dist/{chunk-5ZRDK4KQ.js → chunk-GB26FIZT.js} +96 -118
- package/dist/{chunk-YXAK2637.js → chunk-JUQ2GNMD.js} +1 -1
- package/dist/{chunk-XSLRNFIY.js → chunk-MRU7GX2V.js} +1 -1
- package/dist/{chunk-YVBWCT4S.js → chunk-RPEGZW27.js} +2 -2
- package/dist/{chunk-NHHM5ASX.js → chunk-SMUYGCGP.js} +4 -4
- package/dist/{chunk-7YRXDG7R.js → chunk-UCZGXYCN.js} +9 -7
- package/dist/chunk-W33PYWYQ.js +102 -0
- package/dist/{chunk-5P5PTZ3T.js → chunk-WOGCRDFT.js} +1 -1
- package/dist/{chunk-H4FL5WA5.js → chunk-XQE22UKY.js} +13 -11
- package/dist/{client-DSlycgar.d.ts → client-HG0uMG0Q.d.ts} +6 -6
- package/dist/{deployments-nNS4spO9.d.ts → deployments-B--Shwgx.d.ts} +121 -109
- package/dist/{groups-jLLG7MML.d.ts → groups-CfyRewkJ.d.ts} +1 -1
- package/dist/{images-BPiPqVKn.d.ts → images-DwNmzqWv.d.ts} +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +9 -8
- package/dist/{integrations-Cr9EhGI_.d.ts → integrations-BMNtARU_.d.ts} +2 -0
- package/dist/internal.d.ts +9 -9
- package/dist/internal.js +8 -8
- package/dist/{offers-CPqiF3dZ.d.ts → offers-CEwkAGsB.d.ts} +2 -2
- package/dist/{pages-1h1387a3.d.ts → pages-D1xrbGJl.d.ts} +6 -1
- package/dist/{telegram-DALZ7GdF.d.ts → participant-activity-DYdUUhw2.d.ts} +1 -40
- package/dist/portal-proxy.js +3 -3
- package/dist/react/index.d.ts +11 -11
- package/dist/react/index.js +10 -9
- package/dist/{schema-Br3c1GOu.d.ts → schema-D57mhL2q.d.ts} +1427 -1422
- package/dist/schema.d.ts +325 -323
- package/dist/schema.js +29 -11
- package/dist/server/index.d.ts +9 -9
- package/dist/server/index.js +59 -15
- package/dist/{submission-input-BEJ9qENg.d.ts → submission-input-DjXg0o-r.d.ts} +2 -2
- package/dist/{telegram-browser-CGB01TaB.d.ts → telegram-browser-DaP0Rawg.d.ts} +2 -3
- package/dist/testing.d.ts +18 -6
- package/dist/testing.js +42 -7
- package/dist/{transport-DUc8QwDl.d.ts → transport-BZbTTtBk.d.ts} +2216 -2007
- package/package.json +1 -1
- package/dist/accounts-5ciAkCMP.d.ts +0 -147
package/dist/schema.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
rejectDeploymentSchema,
|
|
41
41
|
rollbackDeploymentSchema,
|
|
42
42
|
submitDeploymentSchema
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-UCZGXYCN.js";
|
|
44
44
|
import {
|
|
45
45
|
capabilityErrorCodes,
|
|
46
46
|
capabilityFailureSchema
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
xPostSchema,
|
|
64
64
|
xProfileSchema,
|
|
65
65
|
xRequestSchema
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-B4EZ76WX.js";
|
|
67
67
|
import {
|
|
68
68
|
QuestOutcomeState,
|
|
69
69
|
RewardDeliveryAction,
|
|
@@ -110,12 +110,8 @@ import {
|
|
|
110
110
|
rewardDeliveriesSchema,
|
|
111
111
|
rewardDeliverySchema,
|
|
112
112
|
roleReconciliationSchema,
|
|
113
|
-
saveQuestDraftSchema
|
|
114
|
-
|
|
115
|
-
telegramInitDataSchema,
|
|
116
|
-
telegramMiniAppSignInSchema,
|
|
117
|
-
telegramSignInMethodsSchema
|
|
118
|
-
} from "./chunk-5ZRDK4KQ.js";
|
|
113
|
+
saveQuestDraftSchema
|
|
114
|
+
} from "./chunk-GB26FIZT.js";
|
|
119
115
|
import {
|
|
120
116
|
AVATAR_UPLOAD_LIMIT,
|
|
121
117
|
PointEntryKind,
|
|
@@ -230,7 +226,21 @@ import {
|
|
|
230
226
|
referralRewardResolutionSchema,
|
|
231
227
|
referralSummarySchema,
|
|
232
228
|
referralSuspensionSchema
|
|
233
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-MRU7GX2V.js";
|
|
230
|
+
import {
|
|
231
|
+
telegramAccountConnectionSchema,
|
|
232
|
+
telegramChatConnectionSchema,
|
|
233
|
+
telegramChatIdSchema,
|
|
234
|
+
telegramChatMemberSchema,
|
|
235
|
+
telegramChatSchema,
|
|
236
|
+
telegramChatsSchema,
|
|
237
|
+
telegramInitDataSchema,
|
|
238
|
+
telegramMemberInputSchema,
|
|
239
|
+
telegramMiniAppSignInSchema,
|
|
240
|
+
telegramReactionDataSchema,
|
|
241
|
+
telegramReactionsNamespace,
|
|
242
|
+
telegramSignInMethodsSchema
|
|
243
|
+
} from "./chunk-W33PYWYQ.js";
|
|
234
244
|
import {
|
|
235
245
|
authScopeSchema,
|
|
236
246
|
exchangeResultSchema,
|
|
@@ -241,7 +251,7 @@ import {
|
|
|
241
251
|
principalSchema,
|
|
242
252
|
sessionMember,
|
|
243
253
|
sessionSchema
|
|
244
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-JUQ2GNMD.js";
|
|
245
255
|
import {
|
|
246
256
|
AttemptStatus,
|
|
247
257
|
CompletionSourceKind,
|
|
@@ -518,7 +528,7 @@ import {
|
|
|
518
528
|
xPostId,
|
|
519
529
|
xSearchSourceSchema,
|
|
520
530
|
xTweetSchema
|
|
521
|
-
} from "./chunk-
|
|
531
|
+
} from "./chunk-6UFXPKLA.js";
|
|
522
532
|
export {
|
|
523
533
|
AVATAR_UPLOAD_LIMIT,
|
|
524
534
|
AttemptStatus,
|
|
@@ -936,8 +946,16 @@ export {
|
|
|
936
946
|
submitDeploymentSchema,
|
|
937
947
|
submitSchema,
|
|
938
948
|
telegramAccountConnectionSchema,
|
|
949
|
+
telegramChatConnectionSchema,
|
|
950
|
+
telegramChatIdSchema,
|
|
951
|
+
telegramChatMemberSchema,
|
|
952
|
+
telegramChatSchema,
|
|
953
|
+
telegramChatsSchema,
|
|
939
954
|
telegramInitDataSchema,
|
|
955
|
+
telegramMemberInputSchema,
|
|
940
956
|
telegramMiniAppSignInSchema,
|
|
957
|
+
telegramReactionDataSchema,
|
|
958
|
+
telegramReactionsNamespace,
|
|
941
959
|
telegramSignInMethodsSchema,
|
|
942
960
|
templateSchema,
|
|
943
961
|
textEvidenceSchema,
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { M as ManagementStateQuery, J as managementStateQuerySchema } from '../pages-
|
|
2
|
-
export { ah as CompletionSource, ai as CompletionSourceKind, ao as KnownCompletionSourceKind, bl as entitlementCorrectionSchema, bn as entitlementSchema, bB as memberIdentitySchema, j as trackerDataIssue, k as trackerDataIssues, cX as trackerTriggerOutcomePageSchema, w as whereSchemaIssue } from '../schema-
|
|
3
|
-
import '../offers-
|
|
1
|
+
export { M as ManagementStateQuery, J as managementStateQuerySchema } from '../pages-D1xrbGJl.js';
|
|
2
|
+
export { ah as CompletionSource, ai as CompletionSourceKind, ao as KnownCompletionSourceKind, bl as entitlementCorrectionSchema, bn as entitlementSchema, bB as memberIdentitySchema, j as trackerDataIssue, k as trackerDataIssues, cX as trackerTriggerOutcomePageSchema, w as whereSchemaIssue } from '../schema-D57mhL2q.js';
|
|
3
|
+
import '../offers-CEwkAGsB.js';
|
|
4
4
|
import '../action-DBzILFx9.js';
|
|
5
|
-
export { G as GroupMember, y as GroupMemberPage, z as GroupPage, B as GroupPageQuery, I as ManagedGroup, Q as addGroupMemberSchema, Y as createGroupSchema, aa as engagementRuleVersionPageSchema, ag as groupMemberPageSchema, ah as groupMemberSchema, ai as groupPageQuerySchema, aj as groupPageSchema, aD as managedGroupSchema, aE as managedPointHistoryPageSchema, aO as pointLedgerPropertiesSchema, b3 as referralManagementSchema, b4 as referralQualificationSchema, b6 as referralRewardResolutionSchema, b8 as referralSuspensionSchema, b9 as removeGroupMemberSchema, ba as updateGroupSchema } from '../groups-
|
|
5
|
+
export { G as GroupMember, y as GroupMemberPage, z as GroupPage, B as GroupPageQuery, I as ManagedGroup, Q as addGroupMemberSchema, Y as createGroupSchema, aa as engagementRuleVersionPageSchema, ag as groupMemberPageSchema, ah as groupMemberSchema, ai as groupPageQuerySchema, aj as groupPageSchema, aD as managedGroupSchema, aE as managedPointHistoryPageSchema, aO as pointLedgerPropertiesSchema, b3 as referralManagementSchema, b4 as referralQualificationSchema, b6 as referralRewardResolutionSchema, b8 as referralSuspensionSchema, b9 as removeGroupMemberSchema, ba as updateGroupSchema } from '../groups-CfyRewkJ.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import '../profiles-D29SS12z.js';
|
|
8
|
-
import '../automatic-outcomes-
|
|
9
|
-
export { A as APP_KV_LIMIT, o as APP_MIGRATION_FILE_BYTES, r as APP_MIGRATION_LIMIT, t as APP_MIGRATION_TOTAL_BYTES, u as APP_SCHEDULE_LIMIT, w as APP_SCHEDULE_MIN_INTERVAL, x as APP_SCHEDULE_TIMEOUT, y as APP_SECRET_LIMIT, z as APP_SQL_LIMIT, B as APP_STORAGE_PREVIEW_CHARACTERS, C as APP_STORAGE_ROW_LIMIT, D as Access, E as AccessHistoryQuery, F as AppSchedule, G as AppScheduleList, H as AppSchedules, J as AppSecret, K as AppSecretDeclaration, L as AppSecretInput, N as AppSecretList, O as AppStorage, Q as AppStorageCell, S as AppStorageKeys, T as AppStorageKind, U as AppStorageList, V as AppStorageRows, W as AppStorageTables, X as AppStorageValue, Y as AuditPage, Z as AuditQuery, _ as AuditRecord, $ as BalanceCheck, a0 as BuildArtifacts, a1 as BuildIdentity, a2 as BuildSnapshot, a3 as BuildStatus, a4 as CompletionRevocation, a5 as CompletionRevocationShortfall, a6 as CompletionRevokeInput, a7 as DEFAULT_MANAGEMENT_TIMEOUT, a8 as HostedAppSecrets, a9 as HostedBuild, aa as HostedDeploymentKey, ab as HostedKey, ac as HostedKeyPermission, ad as HostedManagementEnv, ae as IdentityLinkRelinkInput, af as InventoryItemAction, ag as InventoryItemRename, ah as InventoryItemState, ai as InventoryStockCorrection, aj as KnownPayoutSourceKind, ak as LeaderboardSettlementRejection, al as LeaderboardSettlementReview, am as ListQuery, an as ManagedAttempt, ao as ManagedAttemptPage, ap as ManagedAttemptQuery, aq as ManagedEntitlement, ar as ManagedEntitlementPage, as as ManagedEntitlementQuery, at as ManagedMemberIdentity, au as ManagedMemberPage, av as ManagedMemberQuery, aw as ManagedOAuthAccount, ax as ManagedQuestEnrollment, ay as ManagedReleasePage, az as ManagedReleaseQuery, aA as ManagedResource, aB as ManagedStockItem, aC as ManagedTelegramAccount, aD as ManagedWallet, aE as ManagementCallOptions, aF as ManagementClient, aG as ManagementClientOptions, aH as ManagementError, aI as ManagementErrorCode, aJ as ManagementErrorInit, aK as ManagementErrorKind, aL as ManagementPage, aM as ManagementRawInit, aN as MemberDetail, aO as MemberIdentityLink, aP as OperatorUser, aQ as ParticipantSignIn, aR as ParticipantSignInInput, aS as PayoutSourceKind, aT as Permission, aU as Person, aV as Project, aW as ProjectMetrics, aX as QuestEnrollmentState, aY as QuestEnrollmentWithdrawalInput, aZ as QuestLifecycle, a_ as QuestLifecycleInput, R as REFERRAL_INTEGRATION_REWARD_ERROR, a$ as ResourceArchiveInput, b0 as ResourceLifecycleInput, b1 as RevokedDeliveryOutcome, b2 as RevokedEntitlementOutcome, b3 as RevokedReferralOutcome, b4 as ScheduledInvocation, b5 as StagedDeployment, b6 as StagedDeploymentContent, b7 as StagingAccess, b8 as StagingAccessInput, b9 as StagingLink, ba as StarterId, bb as StarterTemplate, bc as TestMember, bd as TestMemberActionInput, be as TestMemberAdvanceInput, bf as TestMemberCreateInput, bg as TestMemberHistory, bh as TestMemberHistoryQuery, bi as TestMemberResetInput, bj as TestMemberResetResult, bk as TestMemberWallet, bl as TestMemberWalletLinkInput, bm as TestMemberWalletUnlinkInput, bn as WEBHOOK_MAX_BYTES, bo as WalletBalanceChains, bp as WebhookDeleteInput, bq as WebhookEndpointState, br as WebhookEvent, bs as accessHistoryQuerySchema, bt as accessSchema, bu as accountProfileSchema, bv as appMigrationNameSchema, bw as appRoutingSchema, bx as appScheduleListSchema, by as appScheduleNameSchema, bz as appSchedulePathSchema, bA as appScheduleRunSchema, bB as appScheduleSchema, bC as appScheduleStateSchema, bD as appSchedulesSchema, bE as appSecretDeclarationSchema, bF as appSecretDeclarationsSchema, bG as appSecretInputSchema, bH as appSecretListSchema, bI as appSecretNameSchema, bJ as appSecretSchema, bK as appSecretValueSchema, bL as appStorageCellSchema, bM as appStorageKeysSchema, bN as appStorageKindSchema, bO as appStorageListSchema, bP as appStorageRowsSchema, bQ as appStorageSchema, bR as appStorageTablesSchema, bS as appStorageValueSchema, bT as assetPathSchema, bU as auditPageSchema, bV as auditQuerySchema, bW as auditRecordSchema, bX as balanceCheckSchema, bY as buildArtifactsSchema, bZ as buildIdentitySchema, b_ as buildPhaseSchema, b$ as buildSnapshotSchema, c0 as buildStatusSchema, c1 as commitSchema, c2 as compareAppMigrations, c3 as completionRevocationSchema, c4 as completionRevocationShortfallSchema, c5 as completionRevokeSchema, c as containsReferralIntegrationReward, c6 as createManagementClient, c7 as createRepositorySchema, c8 as developmentPreflightSchema, c9 as deviceApproveSchema, ca as deviceRedeemSchema, cb as deviceStartSchema, cc as environmentSchema, cd as grantRecordSchema, ce as grantSchema, cf as hostedAppSchema, cg as hostedAppSecretsSchema, ch as hostedBuildSchema, ci as hostedDeploymentKeySchema, cj as hostedKeyPermissions, ck as hostedKeySchema, cl as hostedKeySecretSchema, cm as hostedManagementBindings, cn as hostedManagementClient, i as identityIntegrationInputSchema, a as identityIntegrationSchema, d as identityKindClaimSchema, co as identityLinkRelinkInputSchema, cp as identityLinkSelectorSchema, cq as ingestTrackerScopeSchema, cr as inventoryItemActionSchema, cs as inventoryItemPageSchema, ct as inventoryItemRenameSchema, cu as inventoryItemStateSchema, cv as inventorySchema, cw as inventoryStockCorrectionSchema, e as isIntegrationParticipantPath, cx as isManagementError, f as isParticipantRoute, cy as issuedTokenSchema, cz as leaderboardSettlementRejectionSchema, cA as leaderboardSettlementReviewPageSchema, cB as leaderboardSettlementReviewQuerySchema, cC as leaderboardSettlementReviewSchema, cD as leaderboardSettlementReviewSummarySchema, cE as managedAttemptPageSchema, cF as managedAttemptQuerySchema, cG as managedAttemptSchema, cH as managedEntitlementPageSchema, cI as managedEntitlementQuerySchema, cJ as managedEntitlementSchema, cK as managedMemberIdentitySchema, cL as managedMemberPageSchema, cM as managedMemberQuerySchema, cN as managedOAuthAccountSchema, cO as managedQuestEnrollmentPageSchema, cP as managedQuestEnrollmentSchema, cQ as managedReleasePageSchema, cR as managedReleaseQuerySchema, cS as managedResourceSchema, cT as managedStockItemSchema, cU as managedTelegramAccountSchema, cV as managedWalletSchema, cW as managementErrorSchema, cX as managementResponseSchemas, cY as managementResponses, cZ as memberAccountSchema, c_ as memberDetailSchema, c$ as memberIdentityChangeInputSchema, d0 as memberIdentityLinkPageSchema, d1 as memberIdentityLinkSchema, d2 as memberLookupSchema, d3 as memberOAuthUnlinkInputSchema, d4 as memberSchema, d5 as memberTelegramUnlinkInputSchema, d6 as memberWalletSignInInputSchema, d7 as memberWalletUnlinkInputSchema, d8 as metricsSchema, d9 as nextScheduleRun, da as oauthIdentitySelectorSchema, db as operationInputSchema, dc as operationSchema, dd as operatorUserSchema, de as pageSchema, p as parseImageExtraction, g as parseImageResult, h as participantExchangeSchema, j as participantRoutePattern, k as participantRoutes, df as participantSignInInputSchema, dg as participantSignInSchema, dh as permissionSchema, di as personSchema, dj as projectDeletionInputSchema, dk as projectDeletionSchema, dl as projectInputSchema, dm as projectMetricsSchema, dn as projectSchema, dp as projectSetupSchema, dq as projectTransferInputSchema, dr as projectTransferSchema, ds as projectUpdateInputSchema, dt as querySchema, q as questConfiguration, du as questEnrollmentStateSchema, dv as questEnrollmentWithdrawalInputSchema, dw as questLifecycleInputSchema, dx as questLifecycleSchema, dy as readinessSchema, dz as repositorySchema, dA as resourceArchiveInputSchema, dB as resourceLifecycleInputSchema, dC as resourceLifecycleKindSchema, dD as resourceLifecyclePaths, dE as resourceLifecycleResultSchema, dF as rolePermissions, dG as roleSchema, dH as scheduledInvocationSchema, s as sequenceCursorSchema, l as sourceDataSchema, n as sourceRoles, dI as stageRequestSchema, dJ as stagedDeploymentContentSchema, dK as stagedDeploymentKey, dL as stagedDeploymentLimits, dM as stagedDeploymentSchema, dN as stagingAccessInputSchema, dO as stagingAccessModeSchema, dP as stagingAccessSchema, dQ as stagingLinkSchema, dR as stagingPathSchema, dS as starterIdSchema, dT as starterTemplates, dU as stockAdditionSchema, dV as stockInputSchema, dW as teamSchema, dX as telegramBotIdSchema, dY as testMemberActionSchema, dZ as testMemberAdvanceSchema, d_ as testMemberCreateSchema, d$ as testMemberHistoryQuerySchema, e0 as testMemberHistorySchema, e1 as testMemberResetResultSchema, e2 as testMemberResetSchema, e3 as testMemberSchema, e4 as testMemberWalletLinkSchema, e5 as testMemberWalletSchema, e6 as testMemberWalletUnlinkSchema, e7 as tokenInputSchema, e8 as tokenSchema, e9 as tokenScopeInputSchema, v as validateQuestShape, ea as verifiedPassSchema, eb as verifyScheduledRequest, ec as verifyWebhook, ed as walletBalanceChainsSchema, ee as walletIdentitySelectorSchema, ef as webhookControlInputSchema, eg as webhookDeleteInputSchema, eh as webhookDeliveryPageSchema, ei as webhookDeliverySchema, ej as webhookEndpointSchema, ek as webhookEndpointStateSchema, el as webhookEventSchema, em as webhookInputSchema, en as webhookQuerySchema, eo as webhookSecretSchema, ep as webhookStatePageSchema, eq as webhookStateQuerySchema, er as webhookUpdateSchema } from '../transport-
|
|
10
|
-
export { A as AttemptCapture, C as CapturedFact, a as attemptCaptureSchema, c as capturedFactSchema } from '../attempt-captures-
|
|
11
|
-
export { d as activityTypeSchema, e as activityTypes, h as deploymentActionSchema, k as deploymentRejectionSchema } from '../deployments-
|
|
12
|
-
export { E as Extracted } from '../images-
|
|
8
|
+
import '../automatic-outcomes-T9lEIvTj.js';
|
|
9
|
+
export { A as APP_KV_LIMIT, o as APP_MIGRATION_FILE_BYTES, r as APP_MIGRATION_LIMIT, t as APP_MIGRATION_TOTAL_BYTES, u as APP_SCHEDULE_LIMIT, w as APP_SCHEDULE_MIN_INTERVAL, x as APP_SCHEDULE_TIMEOUT, y as APP_SECRET_LIMIT, z as APP_SQL_LIMIT, B as APP_STORAGE_PREVIEW_CHARACTERS, C as APP_STORAGE_ROW_LIMIT, D as Access, E as AccessHistoryQuery, F as AppSchedule, G as AppScheduleList, H as AppSchedules, J as AppSecret, K as AppSecretDeclaration, L as AppSecretInput, N as AppSecretList, O as AppStorage, Q as AppStorageCell, S as AppStorageKeys, T as AppStorageKind, U as AppStorageList, V as AppStorageRows, W as AppStorageTables, X as AppStorageValue, Y as AuditPage, Z as AuditQuery, _ as AuditRecord, $ as BalanceCheck, a0 as BuildArtifacts, a1 as BuildIdentity, a2 as BuildSnapshot, a3 as BuildStatus, a4 as CompletionRevocation, a5 as CompletionRevocationShortfall, a6 as CompletionRevokeInput, a7 as DEFAULT_MANAGEMENT_TIMEOUT, a8 as HostedAppSecrets, a9 as HostedBuild, aa as HostedDeploymentKey, ab as HostedKey, ac as HostedKeyPermission, ad as HostedManagementEnv, ae as IdentityLinkRelinkInput, af as InventoryItemAction, ag as InventoryItemRename, ah as InventoryItemState, ai as InventoryStockCorrection, aj as KnownPayoutSourceKind, ak as LeaderboardSettlementRejection, al as LeaderboardSettlementReview, am as ListQuery, an as ManagedAttempt, ao as ManagedAttemptPage, ap as ManagedAttemptQuery, aq as ManagedEntitlement, ar as ManagedEntitlementPage, as as ManagedEntitlementQuery, at as ManagedMemberIdentity, au as ManagedMemberPage, av as ManagedMemberQuery, aw as ManagedOAuthAccount, ax as ManagedQuestEnrollment, ay as ManagedReleasePage, az as ManagedReleaseQuery, aA as ManagedResource, aB as ManagedStockItem, aC as ManagedTelegramAccount, aD as ManagedWallet, aE as ManagementCallOptions, aF as ManagementClient, aG as ManagementClientOptions, aH as ManagementError, aI as ManagementErrorCode, aJ as ManagementErrorInit, aK as ManagementErrorKind, aL as ManagementPage, aM as ManagementRawInit, aN as MemberDetail, aO as MemberIdentityLink, aP as OperatorUser, aQ as ParticipantSignIn, aR as ParticipantSignInInput, aS as PayoutSourceKind, aT as Permission, aU as Person, aV as Project, aW as ProjectMetrics, aX as QuestEnrollmentState, aY as QuestEnrollmentWithdrawalInput, aZ as QuestLifecycle, a_ as QuestLifecycleInput, R as REFERRAL_INTEGRATION_REWARD_ERROR, a$ as ResourceArchiveInput, b0 as ResourceLifecycleInput, b1 as RevokedDeliveryOutcome, b2 as RevokedEntitlementOutcome, b3 as RevokedReferralOutcome, b4 as ScheduledInvocation, b5 as StagedDeployment, b6 as StagedDeploymentContent, b7 as StagingAccess, b8 as StagingAccessInput, b9 as StagingLink, ba as StarterId, bb as StarterTemplate, bc as TestMember, bd as TestMemberActionInput, be as TestMemberAdvanceInput, bf as TestMemberCreateInput, bg as TestMemberHistory, bh as TestMemberHistoryQuery, bi as TestMemberResetInput, bj as TestMemberResetResult, bk as TestMemberWallet, bl as TestMemberWalletLinkInput, bm as TestMemberWalletUnlinkInput, bn as WEBHOOK_MAX_BYTES, bo as WalletBalanceChains, bp as WebhookDeleteInput, bq as WebhookEndpointState, br as WebhookEvent, bs as accessHistoryQuerySchema, bt as accessSchema, bu as accountProfileSchema, bv as appMigrationNameSchema, bw as appRoutingSchema, bx as appScheduleListSchema, by as appScheduleNameSchema, bz as appSchedulePathSchema, bA as appScheduleRunSchema, bB as appScheduleSchema, bC as appScheduleStateSchema, bD as appSchedulesSchema, bE as appSecretDeclarationSchema, bF as appSecretDeclarationsSchema, bG as appSecretInputSchema, bH as appSecretListSchema, bI as appSecretNameSchema, bJ as appSecretSchema, bK as appSecretValueSchema, bL as appStorageCellSchema, bM as appStorageKeysSchema, bN as appStorageKindSchema, bO as appStorageListSchema, bP as appStorageRowsSchema, bQ as appStorageSchema, bR as appStorageTablesSchema, bS as appStorageValueSchema, bT as assetPathSchema, bU as auditPageSchema, bV as auditQuerySchema, bW as auditRecordSchema, bX as balanceCheckSchema, bY as buildArtifactsSchema, bZ as buildIdentitySchema, b_ as buildPhaseSchema, b$ as buildSnapshotSchema, c0 as buildStatusSchema, c1 as commitSchema, c2 as compareAppMigrations, c3 as completionRevocationSchema, c4 as completionRevocationShortfallSchema, c5 as completionRevokeSchema, c as containsReferralIntegrationReward, c6 as createManagementClient, c7 as createRepositorySchema, c8 as developmentPreflightSchema, c9 as deviceApproveSchema, ca as deviceRedeemSchema, cb as deviceStartSchema, cc as environmentSchema, cd as grantRecordSchema, ce as grantSchema, cf as hostedAppSchema, cg as hostedAppSecretsSchema, ch as hostedBuildSchema, ci as hostedDeploymentKeySchema, cj as hostedKeyPermissions, ck as hostedKeySchema, cl as hostedKeySecretSchema, cm as hostedManagementBindings, cn as hostedManagementClient, i as identityIntegrationInputSchema, a as identityIntegrationSchema, d as identityKindClaimSchema, co as identityLinkRelinkInputSchema, cp as identityLinkSelectorSchema, cq as ingestTrackerScopeSchema, cr as inventoryItemActionSchema, cs as inventoryItemPageSchema, ct as inventoryItemRenameSchema, cu as inventoryItemStateSchema, cv as inventorySchema, cw as inventoryStockCorrectionSchema, e as isIntegrationParticipantPath, cx as isManagementError, f as isParticipantRoute, cy as issuedTokenSchema, cz as leaderboardSettlementRejectionSchema, cA as leaderboardSettlementReviewPageSchema, cB as leaderboardSettlementReviewQuerySchema, cC as leaderboardSettlementReviewSchema, cD as leaderboardSettlementReviewSummarySchema, cE as managedAttemptPageSchema, cF as managedAttemptQuerySchema, cG as managedAttemptSchema, cH as managedEntitlementPageSchema, cI as managedEntitlementQuerySchema, cJ as managedEntitlementSchema, cK as managedMemberIdentitySchema, cL as managedMemberPageSchema, cM as managedMemberQuerySchema, cN as managedOAuthAccountSchema, cO as managedQuestEnrollmentPageSchema, cP as managedQuestEnrollmentSchema, cQ as managedReleasePageSchema, cR as managedReleaseQuerySchema, cS as managedResourceSchema, cT as managedStockItemSchema, cU as managedTelegramAccountSchema, cV as managedWalletSchema, cW as managementErrorSchema, cX as managementResponseSchemas, cY as managementResponses, cZ as memberAccountSchema, c_ as memberDetailSchema, c$ as memberIdentityChangeInputSchema, d0 as memberIdentityLinkPageSchema, d1 as memberIdentityLinkSchema, d2 as memberLookupSchema, d3 as memberOAuthUnlinkInputSchema, d4 as memberSchema, d5 as memberTelegramUnlinkInputSchema, d6 as memberWalletSignInInputSchema, d7 as memberWalletUnlinkInputSchema, d8 as metricsSchema, d9 as nextScheduleRun, da as oauthIdentitySelectorSchema, db as operationInputSchema, dc as operationSchema, dd as operatorUserSchema, de as pageSchema, p as parseImageExtraction, g as parseImageResult, h as participantExchangeSchema, j as participantRoutePattern, k as participantRoutes, df as participantSignInInputSchema, dg as participantSignInSchema, dh as permissionSchema, di as personSchema, dj as projectDeletionInputSchema, dk as projectDeletionSchema, dl as projectInputSchema, dm as projectMetricsSchema, dn as projectSchema, dp as projectSetupSchema, dq as projectTransferInputSchema, dr as projectTransferSchema, ds as projectUpdateInputSchema, dt as querySchema, q as questConfiguration, du as questEnrollmentStateSchema, dv as questEnrollmentWithdrawalInputSchema, dw as questLifecycleInputSchema, dx as questLifecycleSchema, dy as readinessSchema, dz as repositorySchema, dA as resourceArchiveInputSchema, dB as resourceLifecycleInputSchema, dC as resourceLifecycleKindSchema, dD as resourceLifecyclePaths, dE as resourceLifecycleResultSchema, dF as rolePermissions, dG as roleSchema, dH as scheduledInvocationSchema, s as sequenceCursorSchema, l as sourceDataSchema, n as sourceRoles, dI as stageRequestSchema, dJ as stagedDeploymentContentSchema, dK as stagedDeploymentKey, dL as stagedDeploymentLimits, dM as stagedDeploymentSchema, dN as stagingAccessInputSchema, dO as stagingAccessModeSchema, dP as stagingAccessSchema, dQ as stagingLinkSchema, dR as stagingPathSchema, dS as starterIdSchema, dT as starterTemplates, dU as stockAdditionSchema, dV as stockInputSchema, dW as teamSchema, dX as telegramBotIdSchema, dY as testMemberActionSchema, dZ as testMemberAdvanceSchema, d_ as testMemberCreateSchema, d$ as testMemberHistoryQuerySchema, e0 as testMemberHistorySchema, e1 as testMemberResetResultSchema, e2 as testMemberResetSchema, e3 as testMemberSchema, e4 as testMemberWalletLinkSchema, e5 as testMemberWalletSchema, e6 as testMemberWalletUnlinkSchema, e7 as tokenInputSchema, e8 as tokenSchema, e9 as tokenScopeInputSchema, v as validateQuestShape, ea as verifiedPassSchema, eb as verifyScheduledRequest, ec as verifyWebhook, ed as walletBalanceChainsSchema, ee as walletIdentitySelectorSchema, ef as webhookControlInputSchema, eg as webhookDeleteInputSchema, eh as webhookDeliveryPageSchema, ei as webhookDeliverySchema, ej as webhookEndpointSchema, ek as webhookEndpointStateSchema, el as webhookEventSchema, em as webhookInputSchema, en as webhookQuerySchema, eo as webhookSecretSchema, ep as webhookStatePageSchema, eq as webhookStateQuerySchema, er as webhookUpdateSchema } from '../transport-BZbTTtBk.js';
|
|
10
|
+
export { A as AttemptCapture, C as CapturedFact, a as attemptCaptureSchema, c as capturedFactSchema } from '../attempt-captures-JDIgz2lY.js';
|
|
11
|
+
export { d as activityTypeSchema, e as activityTypes, h as deploymentActionSchema, k as deploymentRejectionSchema } from '../deployments-B--Shwgx.js';
|
|
12
|
+
export { E as Extracted } from '../images-DwNmzqWv.js';
|
package/dist/server/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
attemptCaptureSchema,
|
|
3
3
|
capturedFactSchema
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-G75JVB4D.js";
|
|
5
5
|
import {
|
|
6
6
|
activityTypeSchema,
|
|
7
7
|
activityTypes,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
publishDeploymentSchema,
|
|
26
26
|
rejectDeploymentSchema,
|
|
27
27
|
submitDeploymentSchema
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-UCZGXYCN.js";
|
|
29
29
|
import "../chunk-MC6V6VMG.js";
|
|
30
30
|
import {
|
|
31
31
|
DEFAULT_MANAGEMENT_TIMEOUT,
|
|
@@ -44,19 +44,19 @@ import {
|
|
|
44
44
|
participantExchangeSchema,
|
|
45
45
|
questConfiguration,
|
|
46
46
|
sequenceCursorSchema
|
|
47
|
-
} from "../chunk-
|
|
47
|
+
} from "../chunk-SMUYGCGP.js";
|
|
48
48
|
import {
|
|
49
49
|
parseImageExtraction,
|
|
50
50
|
parseImageResult
|
|
51
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-ENBQ6UEE.js";
|
|
52
52
|
import {
|
|
53
53
|
imageAssetArtifactSchema
|
|
54
|
-
} from "../chunk-
|
|
54
|
+
} from "../chunk-B4EZ76WX.js";
|
|
55
55
|
import {
|
|
56
56
|
sourceDataSchema,
|
|
57
57
|
sourceRoles,
|
|
58
58
|
validateQuestShape
|
|
59
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-AXQYGVOP.js";
|
|
60
60
|
import {
|
|
61
61
|
isIntegrationParticipantPath,
|
|
62
62
|
isParticipantRoute,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
} from "../chunk-USVER53M.js";
|
|
66
66
|
import {
|
|
67
67
|
withActionId
|
|
68
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-E7MVYASS.js";
|
|
69
69
|
import {
|
|
70
70
|
allocateQuestSchema,
|
|
71
71
|
allocatedQuestSchema,
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
rewardDeliveriesSchema,
|
|
84
84
|
rewardDeliverySchema,
|
|
85
85
|
saveQuestDraftSchema
|
|
86
|
-
} from "../chunk-
|
|
86
|
+
} from "../chunk-GB26FIZT.js";
|
|
87
87
|
import {
|
|
88
88
|
badgeMutationResultSchema,
|
|
89
89
|
badgeMutationSchema,
|
|
@@ -133,10 +133,15 @@ import {
|
|
|
133
133
|
referralQualificationSchema,
|
|
134
134
|
referralRewardResolutionSchema,
|
|
135
135
|
referralSuspensionSchema
|
|
136
|
-
} from "../chunk-
|
|
137
|
-
import
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
} from "../chunk-MRU7GX2V.js";
|
|
137
|
+
import {
|
|
138
|
+
telegramChatConnectionSchema,
|
|
139
|
+
telegramChatIdSchema,
|
|
140
|
+
telegramChatsSchema
|
|
141
|
+
} from "../chunk-W33PYWYQ.js";
|
|
142
|
+
import "../chunk-WOGCRDFT.js";
|
|
143
|
+
import "../chunk-57KARWUC.js";
|
|
144
|
+
import "../chunk-JUQ2GNMD.js";
|
|
140
145
|
import {
|
|
141
146
|
CompletionSourceKind,
|
|
142
147
|
addGroupMemberSchema,
|
|
@@ -221,7 +226,7 @@ import {
|
|
|
221
226
|
walletSignInNetworksSchema,
|
|
222
227
|
walletUnlinkInputSchema,
|
|
223
228
|
whereSchemaIssue
|
|
224
|
-
} from "../chunk-
|
|
229
|
+
} from "../chunk-6UFXPKLA.js";
|
|
225
230
|
|
|
226
231
|
// src/server/identity-links.ts
|
|
227
232
|
import { z } from "zod";
|
|
@@ -3152,8 +3157,8 @@ function managementClient(options) {
|
|
|
3152
3157
|
call
|
|
3153
3158
|
),
|
|
3154
3159
|
/**
|
|
3155
|
-
*
|
|
3156
|
-
* its wallet addresses.
|
|
3160
|
+
* Needs publish permission, in test only; hosted app keys cannot call these. Reset deletes the
|
|
3161
|
+
* member and frees its wallet addresses.
|
|
3157
3162
|
*/
|
|
3158
3163
|
testMembers: {
|
|
3159
3164
|
create: (input, call) => post(
|
|
@@ -3584,6 +3589,37 @@ function managementClient(options) {
|
|
|
3584
3589
|
call
|
|
3585
3590
|
)
|
|
3586
3591
|
},
|
|
3592
|
+
/**
|
|
3593
|
+
* The Telegram chats this project and environment connected through Domino's bot, which
|
|
3594
|
+
* `ctx.telegram.member()` and `telegram.reactions()` read. Telegram is not one of the
|
|
3595
|
+
* project integrations in SDK 1.x, so it has methods of its own.
|
|
3596
|
+
*/
|
|
3597
|
+
telegram: {
|
|
3598
|
+
/** The connected chats and their bot health; requires `read` permission. */
|
|
3599
|
+
chats: (call) => get("/integrations/telegram", telegramChatsSchema, call),
|
|
3600
|
+
/**
|
|
3601
|
+
* Starts connecting a chat; requires `publish` permission. Open the returned `url` in
|
|
3602
|
+
* Telegram, start Domino's bot and choose a group or channel you administer: the bot joins
|
|
3603
|
+
* it as an administrator and the chat appears in `chats()`.
|
|
3604
|
+
*/
|
|
3605
|
+
connect: (call) => post(
|
|
3606
|
+
"/integrations/telegram/connect",
|
|
3607
|
+
telegramChatConnectionSchema,
|
|
3608
|
+
{},
|
|
3609
|
+
call
|
|
3610
|
+
),
|
|
3611
|
+
/**
|
|
3612
|
+
* Disconnects a chat from this project and environment; requires `publish` permission. The
|
|
3613
|
+
* bot leaves the chat once no project uses it.
|
|
3614
|
+
*/
|
|
3615
|
+
remove: (chat, call) => request(
|
|
3616
|
+
`/integrations/telegram/chats/${encodeURIComponent(telegramChatIdSchema.parse(chat))}`,
|
|
3617
|
+
telegramChatsSchema,
|
|
3618
|
+
void 0,
|
|
3619
|
+
"DELETE",
|
|
3620
|
+
call
|
|
3621
|
+
)
|
|
3622
|
+
},
|
|
3587
3623
|
/** How participants sign in to this project and environment. */
|
|
3588
3624
|
participantSignIn: (call) => get("/participant-sign-in", participantSignInSchema, call),
|
|
3589
3625
|
/**
|
|
@@ -3810,6 +3846,12 @@ var managementResponseSchemas = lazyResponseReaders({
|
|
|
3810
3846
|
get managedTelegramAccountSchema() {
|
|
3811
3847
|
return knownResponse(managedTelegramAccountSchema);
|
|
3812
3848
|
},
|
|
3849
|
+
get telegramChatsSchema() {
|
|
3850
|
+
return knownResponse(telegramChatsSchema);
|
|
3851
|
+
},
|
|
3852
|
+
get telegramChatConnectionSchema() {
|
|
3853
|
+
return knownResponse(telegramChatConnectionSchema);
|
|
3854
|
+
},
|
|
3813
3855
|
get managedPointHistoryPageSchema() {
|
|
3814
3856
|
return knownResponse(managedPointHistoryPageSchema);
|
|
3815
3857
|
},
|
|
@@ -4077,6 +4119,8 @@ var managementResponses = {
|
|
|
4077
4119
|
managedMemberPageSchema: responseSchema(managedMemberPageSchema),
|
|
4078
4120
|
managedOAuthAccountSchema: responseSchema(managedOAuthAccountSchema),
|
|
4079
4121
|
managedTelegramAccountSchema: responseSchema(managedTelegramAccountSchema),
|
|
4122
|
+
telegramChatsSchema: responseSchema(telegramChatsSchema),
|
|
4123
|
+
telegramChatConnectionSchema: responseSchema(telegramChatConnectionSchema),
|
|
4080
4124
|
managedPointHistoryPageSchema: responseSchema(managedPointHistoryPageSchema),
|
|
4081
4125
|
managedPointLedgerSchema: responseSchema(managedPointLedgerSchema),
|
|
4082
4126
|
managedProfileSchema: responseSchema(managedProfileSchema),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { L as LedgerReference, r as QuestHandle } from './schema-
|
|
3
|
-
import { p as ProjectGroupReference } from './groups-
|
|
2
|
+
import { L as LedgerReference, r as QuestHandle } from './schema-D57mhL2q.js';
|
|
3
|
+
import { p as ProjectGroupReference } from './groups-CfyRewkJ.js';
|
|
4
4
|
|
|
5
5
|
declare const completionPrerequisiteSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
6
|
kind: z.ZodLiteral<"completion">;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { a as AuthProvider } from './accounts-
|
|
2
|
-
import { o as createRelayClient, k as RelayRequestOptions, g as RelayError } from './client-
|
|
3
|
-
import { c as TelegramSignInMethods } from './telegram-DALZ7GdF.js';
|
|
1
|
+
import { a as AuthProvider, b as TelegramSignInMethods } from './accounts-B31dWEYD.js';
|
|
2
|
+
import { o as createRelayClient, k as RelayRequestOptions, g as RelayError } from './client-HG0uMG0Q.js';
|
|
4
3
|
import { C as CosmosChain, a as CosmosNetwork, f as WalletSigner, d as WalletSignInNetwork } from './wallet-CDyo-U4n.js';
|
|
5
4
|
|
|
6
5
|
/** An EIP-1193 provider, such as `window.ethereum` or an EIP-6963 announcement's provider. */
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { bB as memberIdentitySchema, cM as trackerQuerySchema, cI as trackerPageSchema, cV as trackerSummarySchema, aH as TrackerContentQuery, cu as trackerContentSchema, bG as photoResultSchema,
|
|
1
|
+
import { bB as memberIdentitySchema, cM as trackerQuerySchema, cI as trackerPageSchema, cV as trackerSummarySchema, aH as TrackerContentQuery, cu as trackerContentSchema, bG as photoResultSchema, Z as TextReviewInput, R as Reward, $ as Decision, aD as TrackerAttribution, y as Tracker, z as TrackerData, a4 as ContentBody, V as TrackerTriggerContext, aa as TrackerPage } from './schema-D57mhL2q.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
3
|
+
import { t as discordMemberSchema, w as discordMessageSchema, G as telegramChatMemberSchema } from './accounts-B31dWEYD.js';
|
|
4
4
|
import { b as CapabilityFailure, x as xConnectionSchema, j as xProfileSchema, i as xPostSchema } from './capability-error-oTd3eYFH.js';
|
|
5
5
|
export { C as CapabilityError } from './capability-error-oTd3eYFH.js';
|
|
6
|
-
import { f as ImageReference, n as imageInspectionSchema, j as imageComparisonSchema, q as imageSightingsSchema } from './images-
|
|
6
|
+
import { f as ImageReference, n as imageInspectionSchema, j as imageComparisonSchema, q as imageSightingsSchema } from './images-DwNmzqWv.js';
|
|
7
7
|
import { u as linkedWalletSchema, z as walletBalanceSchema } from './wallet-CDyo-U4n.js';
|
|
8
|
-
export { A as AttemptCapture, C as CapturedFact } from './attempt-captures-
|
|
8
|
+
export { A as AttemptCapture, C as CapturedFact } from './attempt-captures-JDIgz2lY.js';
|
|
9
9
|
|
|
10
10
|
/** One project time-zone change: from `effectiveAt` on, days are counted in `timeZone`. */
|
|
11
11
|
type CalendarSegment = {
|
|
@@ -250,11 +250,11 @@ type TrackerFacts = {
|
|
|
250
250
|
};
|
|
251
251
|
/**
|
|
252
252
|
* Fake answers for the evaluator's capabilities, keyed like the evaluation context: `member`,
|
|
253
|
-
* `wallet`, `x`, `discord`, `trackers` (by tracker key), `images` and `review`.
|
|
253
|
+
* `wallet`, `x`, `discord`, `telegram`, `trackers` (by tracker key), `images` and `review`.
|
|
254
254
|
*
|
|
255
255
|
* Reads of the member's own accounts default to a member who has linked nothing:
|
|
256
256
|
* `member.identities()`, `wallet.list()`, `wallet.balance()`, `x.connection()`, `x.profile()`,
|
|
257
|
-
* `x.follows()`, `x.reposted()` and `
|
|
257
|
+
* `x.follows()`, `x.reposted()`, `discord.member()` and `telegram.member()` resolve to null. Once the test links an
|
|
258
258
|
* account (`wallet.list` or `x.connection` set to a value), supply every read of it the quest
|
|
259
259
|
* makes. Every other read (an X post, a Discord message, trackers, images and AI review) needs an
|
|
260
260
|
* answer: a call without one fails the run.
|
|
@@ -298,6 +298,18 @@ type TestFacts = {
|
|
|
298
298
|
}
|
|
299
299
|
], Result<typeof discordMessageSchema> | null>;
|
|
300
300
|
};
|
|
301
|
+
/**
|
|
302
|
+
* `ctx.telegram.member({ chat })`, which the testing kit supplies to every quest as Relay does.
|
|
303
|
+
* Throw `new CapabilityError("integration-required", …)` to act out a chat the project has not
|
|
304
|
+
* connected. A run's `calls` does not list Telegram calls: its request type is closed in SDK 1.x.
|
|
305
|
+
*/
|
|
306
|
+
telegram?: {
|
|
307
|
+
member?: FakeAnswer<[
|
|
308
|
+
input: {
|
|
309
|
+
chat: string;
|
|
310
|
+
}
|
|
311
|
+
], Result<typeof telegramChatMemberSchema> | null>;
|
|
312
|
+
};
|
|
301
313
|
trackers?: Record<string, TrackerFacts>;
|
|
302
314
|
images?: {
|
|
303
315
|
inspect?: FakeAnswer<[
|
package/dist/testing.js
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
attemptCaptureSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G75JVB4D.js";
|
|
4
4
|
import {
|
|
5
5
|
CapabilityError
|
|
6
6
|
} from "./chunk-MC6V6VMG.js";
|
|
7
7
|
import {
|
|
8
8
|
parseImageResult
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ENBQ6UEE.js";
|
|
10
10
|
import {
|
|
11
11
|
imageRequestSchema,
|
|
12
12
|
xConnectionSchema,
|
|
13
13
|
xPostSchema,
|
|
14
14
|
xProfileSchema,
|
|
15
15
|
xRequestSchema
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-B4EZ76WX.js";
|
|
17
|
+
import {
|
|
18
|
+
telegramChatMemberSchema,
|
|
19
|
+
telegramMemberInputSchema
|
|
20
|
+
} from "./chunk-W33PYWYQ.js";
|
|
17
21
|
import {
|
|
18
22
|
contentPerformanceSnapshotSchema,
|
|
19
23
|
cosmosNetworkSchema,
|
|
@@ -42,7 +46,7 @@ import {
|
|
|
42
46
|
urlEvidenceSchema,
|
|
43
47
|
validateSubmissionValue,
|
|
44
48
|
walletBalanceSchema
|
|
45
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-6UFXPKLA.js";
|
|
46
50
|
|
|
47
51
|
// src/testing/run.ts
|
|
48
52
|
import { z as z3 } from "zod";
|
|
@@ -181,6 +185,10 @@ var capabilityRequestSchemas = {
|
|
|
181
185
|
kind: z.literal("member-identities")
|
|
182
186
|
})
|
|
183
187
|
};
|
|
188
|
+
var telegramRequestSchema = z.strictObject({
|
|
189
|
+
kind: z.literal("telegram"),
|
|
190
|
+
input: telegramMemberInputSchema
|
|
191
|
+
});
|
|
184
192
|
var capabilityRequestSchema = z.discriminatedUnion("kind", [
|
|
185
193
|
capabilityRequestSchemas["wallet-balance"],
|
|
186
194
|
capabilityRequestSchemas["tracker-content"],
|
|
@@ -192,7 +200,8 @@ var capabilityRequestSchema = z.discriminatedUnion("kind", [
|
|
|
192
200
|
capabilityRequestSchemas.photo,
|
|
193
201
|
capabilityRequestSchemas.discord,
|
|
194
202
|
capabilityRequestSchemas["wallet-list"],
|
|
195
|
-
capabilityRequestSchemas["member-identities"]
|
|
203
|
+
capabilityRequestSchemas["member-identities"],
|
|
204
|
+
telegramRequestSchema
|
|
196
205
|
]);
|
|
197
206
|
function parseCapabilityRequest(raw) {
|
|
198
207
|
return capabilityRequestSchema.safeParse(raw);
|
|
@@ -234,6 +243,8 @@ function parseCapabilityResult(request, value) {
|
|
|
234
243
|
return z.array(linkedWalletSchema).min(1).nullable().parse(value);
|
|
235
244
|
case "member-identities":
|
|
236
245
|
return z.array(memberIdentitySchema).min(1).nullable().parse(value);
|
|
246
|
+
case "telegram":
|
|
247
|
+
return telegramChatMemberSchema.nullable().parse(value);
|
|
237
248
|
}
|
|
238
249
|
}
|
|
239
250
|
function imageReferences(input) {
|
|
@@ -271,6 +282,9 @@ var readerFactories = {
|
|
|
271
282
|
member: () => call({ kind: "discord", input: {} }),
|
|
272
283
|
message: (input) => call({ kind: "discord", input })
|
|
273
284
|
}),
|
|
285
|
+
telegram: (call) => ({
|
|
286
|
+
member: (input) => call({ kind: "telegram", input })
|
|
287
|
+
}),
|
|
274
288
|
x: (call) => ({
|
|
275
289
|
connection: () => call({ kind: "x", input: { operation: "connection" } }),
|
|
276
290
|
profile: () => call({ kind: "x", input: { operation: "profile" } }),
|
|
@@ -540,6 +554,12 @@ function fakeFor(facts, request) {
|
|
|
540
554
|
args: message ? [request.input] : []
|
|
541
555
|
};
|
|
542
556
|
}
|
|
557
|
+
case "telegram":
|
|
558
|
+
return {
|
|
559
|
+
name: "telegram.member",
|
|
560
|
+
answer: facts.telegram?.member,
|
|
561
|
+
args: [request.input]
|
|
562
|
+
};
|
|
543
563
|
case "tracker-records":
|
|
544
564
|
case "tracker-summary": {
|
|
545
565
|
const method = request.kind === "tracker-records" ? "records" : "summary";
|
|
@@ -695,6 +715,9 @@ function factsAnswerer(facts) {
|
|
|
695
715
|
}
|
|
696
716
|
case "discord":
|
|
697
717
|
return "channelId" in request.input || fake.answer !== void 0 ? ask(fake) : { value: null };
|
|
718
|
+
// Without an answer, the member has not linked Telegram.
|
|
719
|
+
case "telegram":
|
|
720
|
+
return fake.answer !== void 0 ? ask(fake) : { value: null };
|
|
698
721
|
case "image": {
|
|
699
722
|
if (imageReferences(request.input).some(
|
|
700
723
|
(image) => "x" in image && image.x === "profile"
|
|
@@ -929,8 +952,10 @@ function hostContext(run, answer) {
|
|
|
929
952
|
problems.push(error instanceof Error ? error : new Error(String(error)));
|
|
930
953
|
throw error;
|
|
931
954
|
}
|
|
932
|
-
|
|
933
|
-
|
|
955
|
+
if (parsed.data.kind !== "telegram") {
|
|
956
|
+
calls.push({ sequence: current, request: parsed.data, outcome });
|
|
957
|
+
calls.sort((a, b) => a.sequence - b.sequence);
|
|
958
|
+
}
|
|
934
959
|
if ("error" in outcome) {
|
|
935
960
|
throw CapabilityError.from(outcome.error);
|
|
936
961
|
}
|
|
@@ -943,6 +968,8 @@ function hostContext(run, answer) {
|
|
|
943
968
|
images: readerFactories.images(call),
|
|
944
969
|
review: readerFactories.review(call),
|
|
945
970
|
wallet: readerFactories.wallet(call),
|
|
971
|
+
// Relay gives every quest the Telegram reader: it needs no integration declaration.
|
|
972
|
+
telegram: readerFactories.telegram(call),
|
|
946
973
|
// Relay gives quest code the X and Discord readers only for declared integrations.
|
|
947
974
|
...release.integrations.includes("x") ? { x: readerFactories.x(call) } : {},
|
|
948
975
|
...release.integrations.includes("discord") ? { discord: readerFactories.discord(call) } : {}
|
|
@@ -1195,6 +1222,14 @@ function captureAnswerer(facts, fallback, diverged) {
|
|
|
1195
1222
|
if (fact?.outcome && !reason) {
|
|
1196
1223
|
return fact.outcome;
|
|
1197
1224
|
}
|
|
1225
|
+
if (request.kind === "telegram") {
|
|
1226
|
+
if (!answerFallback) {
|
|
1227
|
+
throw new TestSetupError(
|
|
1228
|
+
`Capability call ${sequence}, ctx.telegram.member(), is not in the capture (${reason ?? "new"}): pass facts.telegram to answer it`
|
|
1229
|
+
);
|
|
1230
|
+
}
|
|
1231
|
+
return answerFallback(request);
|
|
1232
|
+
}
|
|
1198
1233
|
const divergence = {
|
|
1199
1234
|
sequence,
|
|
1200
1235
|
reason: reason ?? "new",
|