@appgrowstack/app-contract 0.0.0-stage → 0.1.1

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/rpc.d.ts ADDED
@@ -0,0 +1,901 @@
1
+ import type { ApproveVariantResponse, LegalPushResponse, Problem, AttributionResponse, CreateInviteInput, CreateLinkInput, CreateFeedbackInput, CreateFeedbackResponse, CreateTicketInput, CreateTicketResponse, ForgetInput, IdentifyInput, IdentifyResult, Link, NotifyCampaignState, NotifyCampaignStateList, ListArticlesResponse, ListTicketsResponse, PostTicketMessageRequest, TicketAttachment, TicketMessage, NotifyOpenedRequest, NotifyRunList, NotifyPlanPushRequest, NotifyPlanPushResponse, NotifyVariant, NotifyVariantList, NotifyVariantStatus, NotifyExplain, NotifyPreview, NotifyStats, NotifyGuardrailReport, SessionBatch, SessionBatchAnswer, SessionDiagnostic, PersonId, Project, RecordAttributionInput, RefreshWidgetsInput, RefreshWidgetsResult, RegisterDeviceInput, RegisterWidgetPushInput, SendInput, SendResult, SubscriptionInput, TouchInput, TouchResult, TraitValue, TrackInput, TrackResult, UnregisterDeviceInput, UnregisterWidgetPushInput, CaptureSet, CaptureFile, CaptureSetList, CapturePurpose, CreateCaptureSetRequest, CreateCreativeArchiveRequest, CreateCreativeArchiveResult, CreativeArchive, CreativeArchiveList, CreateCaptureSetResult, CreativeBrand, CreativeBrandBody, CreateCreativeAssetUploadRequest, CreativeAssetList, CreativeAssetUpload, CreativePageList, CreativePage, PutCreativePageRequest, StoreTextList, StoreText, StoreTextField, StoreTextStatus, ProposeStoreTextRequest, GenerateCreativeVariantRequest, CreativeRun, CreativeSurface, CreativeVariantStatus, CreativeVariantList, CreativeVariant, SubmitCreativesRequest, SubmitCreativesResult, RegisterCreativeTestRequest, CreativeTest, CreativeTestStatus, CreativeTestList, CreativeTestDetail, CreativeMetricList, TagEffectSnapshot, CreativeKeywordList, CreativeKeywordSyncResult, CreativeStepList, CreativeStep, CompleteCreativeStepRequest, CreativeRunList, CreateReferenceRequest, CreateReferenceResult, CreativeReference, CreativeReferenceList, CreativeReferenceOrigin, CreativeReferenceSource, UpdateReferenceRequest, Platform, PersonKey, InsightsMetricAnswer, InsightsMetricCompare, InsightsSqlRequest, InsightsSqlResult, InsightsSignalKind, InsightsSignalList, KpiTree, PutKpiTreeRequest, ComputeKpisRequest, ComputeKpisResult, InsightsFindingStatus, InsightsFindingList, InsightsFindingDetail, InsightsFindingDecision, InsightsFinding, PortfolioReport, CompetitorReport, AcquisitionReport, AcquisitionNodeList, WebPageList, AcquisitionNodeLevel, InsightsCollectRequest, InsightsCollectResult, InsightsPushRequest, InsightsCollection, LedgerHypothesis, LedgerHypothesisList, LedgerHypothesisDetail, LedgerHypothesisInput, LedgerHypothesisUpdate, LedgerHypothesisStatus, LedgerAppliedRequest, LedgerConclusionInput, LedgerLearning, LedgerLearningInput, LedgerLearningList, LedgerLearningSource, LedgerLink, LedgerLinkKind, LedgerOutcome, LedgerSearchResult, LedgerSearchKind, LedgerKnowledgeSync, LedgerKnowledgeSyncResult, LedgerKnowledgeList, PushedSource, LedgerSource, LedgerSurface, Audience, PersonSegments, OfferSignatureRequest, OfferSignature, NoticeFeed, NoticeReadResponse } from "./generated/schema.js";
2
+ export declare const APPGROWSTACK_BINDING = "APPGROWSTACK";
3
+ export declare const APPGROWSTACK_SERVICE = "appgrowstack-core";
4
+ export declare const APPGROWSTACK_ENTRYPOINT = "AppGrowStackRpc";
5
+ export interface AppGrowStackBindingProps {
6
+ project: string;
7
+ }
8
+ export interface AppGrowStackService {
9
+ track(input: TrackInput): Promise<TrackResult>;
10
+ identify(input: IdentifyInput): Promise<IdentifyResult>;
11
+ forget(input: ForgetInput): Promise<void>;
12
+ subscription(input: SubscriptionInput): Promise<void>;
13
+ touch(input: TouchInput): Promise<TouchResult>;
14
+ send(input: SendInput): Promise<SendResult>;
15
+ registerDevice(input: RegisterDeviceInput): Promise<void>;
16
+ unregisterDevice(input: UnregisterDeviceInput): Promise<void>;
17
+ registerWidgetPush(input: RegisterWidgetPushInput): Promise<void>;
18
+ unregisterWidgetPush(input: UnregisterWidgetPushInput): Promise<void>;
19
+ refreshWidgets(input: RefreshWidgetsInput): Promise<RefreshWidgetsResult>;
20
+ createLink(input: CreateLinkInput): Promise<Link>;
21
+ createInvite(input: CreateInviteInput): Promise<Link>;
22
+ recordAttribution(input: RecordAttributionInput): Promise<AttributionResponse>;
23
+ createTicket(input: CreateTicketInput): Promise<CreateTicketResponse>;
24
+ }
25
+ export declare const rpcSchemas: {
26
+ readonly track: {
27
+ readonly input: readonly ["people/track.schema.json"];
28
+ readonly result: readonly ["people/track.schema.json", "result"];
29
+ };
30
+ readonly identify: {
31
+ readonly input: readonly ["people/identify.schema.json"];
32
+ readonly result: readonly ["people/identify.schema.json", "result"];
33
+ };
34
+ readonly forget: {
35
+ readonly input: readonly ["people/forget.schema.json"];
36
+ readonly result: null;
37
+ };
38
+ readonly subscription: {
39
+ readonly input: readonly ["people/subscription.schema.json"];
40
+ readonly result: null;
41
+ };
42
+ readonly touch: {
43
+ readonly input: readonly ["people/touch.schema.json"];
44
+ readonly result: readonly ["people/touch.schema.json", "result"];
45
+ };
46
+ readonly send: {
47
+ readonly input: readonly ["notify/send.schema.json"];
48
+ readonly result: readonly ["notify/send.schema.json", "result"];
49
+ };
50
+ readonly registerDevice: {
51
+ readonly input: readonly ["notify/device.schema.json"];
52
+ readonly result: null;
53
+ };
54
+ readonly unregisterDevice: {
55
+ readonly input: readonly ["notify/device.schema.json", "unregister"];
56
+ readonly result: null;
57
+ };
58
+ readonly registerWidgetPush: {
59
+ readonly input: readonly ["notify/device.schema.json", "registerWidgetPush"];
60
+ readonly result: null;
61
+ };
62
+ readonly unregisterWidgetPush: {
63
+ readonly input: readonly ["notify/device.schema.json", "unregisterWidgetPush"];
64
+ readonly result: null;
65
+ };
66
+ readonly refreshWidgets: {
67
+ readonly input: readonly ["notify/device.schema.json", "refreshWidgets"];
68
+ readonly result: readonly ["notify/device.schema.json", "refreshWidgetsResult"];
69
+ };
70
+ readonly createLink: {
71
+ readonly input: readonly ["links/link.schema.json", "createInput"];
72
+ readonly result: readonly ["links/link.schema.json"];
73
+ };
74
+ readonly createInvite: {
75
+ readonly input: readonly ["links/link.schema.json", "inviteInput"];
76
+ readonly result: readonly ["links/link.schema.json"];
77
+ };
78
+ readonly recordAttribution: {
79
+ readonly input: readonly ["links/attribution.schema.json", "recordInput"];
80
+ readonly result: readonly ["links/attribution.schema.json", "response"];
81
+ };
82
+ readonly createTicket: {
83
+ readonly input: readonly ["support/ticket.schema.json", "createInput"];
84
+ readonly result: readonly ["support/ticket.schema.json", "createResponse"];
85
+ };
86
+ };
87
+ export declare const RPC_ERROR_CODES: {
88
+ readonly input: "input";
89
+ readonly project: "project";
90
+ readonly retryLater: "retry_later";
91
+ readonly rateLimited: "rate_limited";
92
+ readonly forbidden: "forbidden";
93
+ readonly notFound: "not_found";
94
+ readonly conflict: "conflict";
95
+ readonly notImplemented: "not_implemented";
96
+ readonly captureMismatch: "capture_mismatch";
97
+ readonly fetchFailed: "fetch_failed";
98
+ readonly referenceMismatch: "reference_mismatch";
99
+ readonly browserUnavailable: "browser_unavailable";
100
+ readonly sqlRefused: "sql_refused";
101
+ readonly scanLimit: "scan_limit";
102
+ };
103
+ export type RpcErrorCode = (typeof RPC_ERROR_CODES)[keyof typeof RPC_ERROR_CODES];
104
+ export declare class AppGrowStackRpcError extends Error {
105
+ readonly code: RpcErrorCode;
106
+ constructor(code: RpcErrorCode, message: string);
107
+ }
108
+ export declare function notImplemented(what: string): AppGrowStackRpcError;
109
+ export declare function rpcErrorCode(error: unknown): RpcErrorCode | null;
110
+ export declare function rpcErrorMessage(error: unknown): string;
111
+ export declare const APPGROWSTACK_API_ENTRYPOINT = "AppGrowStackApiRpc";
112
+ export interface AppGrowStackApiBindingProps {
113
+ caller: "appgrowstack-api";
114
+ }
115
+ export interface ServedSet {
116
+ project: string;
117
+ version: number;
118
+ etag: string;
119
+ body: string;
120
+ }
121
+ export interface AppGrowStackApiService {
122
+ projectForPublicKey(publicKey: string): Promise<Project | null>;
123
+ readCampaignSet(publicKey: string): Promise<ServedSet | null>;
124
+ readConfigSet(publicKey: string): Promise<ServedSet | null>;
125
+ readScreenBundle(publicKey: string, digest: string): Promise<{
126
+ body: ReadableStream<Uint8Array>;
127
+ bytes: number;
128
+ } | null>;
129
+ notifyOpened(input: {
130
+ project: string;
131
+ request: NotifyOpenedRequest;
132
+ }): Promise<void>;
133
+ recordAttribution(input: RecordAttributionInput): Promise<AttributionResponse>;
134
+ openLink(input: OpenLinkInput): Promise<{
135
+ location: string;
136
+ } | null>;
137
+ createTicket(input: CreateTicketInput): Promise<CreateTicketResponse>;
138
+ listTickets(input: {
139
+ project: string;
140
+ owner_token: string;
141
+ }): Promise<ListTicketsResponse>;
142
+ postTicketMessage(input: {
143
+ project: string;
144
+ owner_token: string;
145
+ ticket_id: string;
146
+ request: PostTicketMessageRequest;
147
+ }): Promise<TicketMessage | null>;
148
+ uploadAttachment(input: {
149
+ project: string;
150
+ owner_token: string;
151
+ ticket_id: string;
152
+ content_type: string;
153
+ body: ArrayBuffer;
154
+ }): Promise<TicketAttachment | null>;
155
+ createFeedback(input: CreateFeedbackInput): Promise<CreateFeedbackResponse>;
156
+ listArticles(input: {
157
+ project: string;
158
+ lang: string;
159
+ }): Promise<ListArticlesResponse>;
160
+ sessionBatch(input: {
161
+ project: string;
162
+ batch: SessionBatch;
163
+ received_at: number;
164
+ }): Promise<SessionBatchAnswer>;
165
+ sessionSegment(input: {
166
+ project: string;
167
+ install_id: string;
168
+ session_id: string;
169
+ seq: number;
170
+ body: ReadableStream<Uint8Array>;
171
+ bytes: number;
172
+ }): Promise<void>;
173
+ sessionDiagnostic(input: {
174
+ project: string;
175
+ diagnostic: SessionDiagnostic;
176
+ received_at: number;
177
+ }): Promise<void>;
178
+ observeDevice(input: ObserveDeviceInput): Promise<void>;
179
+ mySegments(input: {
180
+ project: string;
181
+ install_id: string;
182
+ assignment: {
183
+ id: string;
184
+ source: "app_transaction" | "android_id" | "install_id";
185
+ } | null;
186
+ storefront: string | null;
187
+ }): Promise<PersonSegments>;
188
+ signOffer(input: {
189
+ project: string;
190
+ install_id: string;
191
+ request: OfferSignatureRequest;
192
+ }): Promise<OfferSignature>;
193
+ noticeFeed(input: {
194
+ project: string;
195
+ install_id: string;
196
+ lang: string | null;
197
+ platform: Platform | null;
198
+ app_version: string | null;
199
+ image_base: string;
200
+ }): Promise<NoticeFeed>;
201
+ readNotices(input: {
202
+ project: string;
203
+ install_id: string;
204
+ ids: string[];
205
+ }): Promise<NoticeReadResponse>;
206
+ readNoticeImage(publicKey: string, digest: string): Promise<{
207
+ body: ReadableStream<Uint8Array>;
208
+ bytes: number;
209
+ content_type: string;
210
+ } | null>;
211
+ }
212
+ export interface ObserveDeviceInput {
213
+ project: string;
214
+ install_id: string;
215
+ device: string;
216
+ asn: number | null;
217
+ as_org: string | null;
218
+ owner_claim: string | null;
219
+ platform: "ios" | "android" | "other";
220
+ sdk_version: string | null;
221
+ at: number;
222
+ }
223
+ export declare const SESSION_LIVE_BINDING = "SESSION_LIVE";
224
+ export declare const SESSION_LIVE_CLASS = "SessionLive";
225
+ export interface OpenLinkInput {
226
+ host: string;
227
+ kind: "l" | "go";
228
+ code: string;
229
+ platform: "ios" | "android" | "other";
230
+ country: string | null;
231
+ referer_host: string | null;
232
+ page: string | null;
233
+ asn: number | null;
234
+ bot: string | null;
235
+ at: number;
236
+ record: boolean;
237
+ }
238
+ export declare const NOTIFY_BINDING = "NOTIFY";
239
+ export declare const NOTIFY_SERVICE = "appgrowstack-notify";
240
+ export declare const NOTIFY_ENTRYPOINT = "NotifyRpc";
241
+ export type WithPerson<T> = Omit<T, "actor"> & {
242
+ person_id: PersonId;
243
+ };
244
+ export interface NotifyEventsInput {
245
+ project: string;
246
+ person_id: PersonId;
247
+ events: {
248
+ id: string;
249
+ name: string;
250
+ at: number;
251
+ }[];
252
+ }
253
+ export interface PushTouch {
254
+ at: number;
255
+ class: "lifecycle" | "promotional" | "transactional";
256
+ campaign: string;
257
+ key: string;
258
+ }
259
+ export interface AppGrowStackNotifyService {
260
+ validateTraits(input: {
261
+ project: string;
262
+ traits: Record<string, TraitValue | null>;
263
+ }): Promise<Record<string, TraitValue | null>>;
264
+ afterEvents(input: NotifyEventsInput): Promise<void>;
265
+ send(input: WithPerson<SendInput>): Promise<SendResult>;
266
+ registerDevice(input: WithPerson<RegisterDeviceInput>): Promise<void>;
267
+ unregisterDevice(input: UnregisterDeviceInput): Promise<void>;
268
+ registerWidgetPush(input: WithPerson<RegisterWidgetPushInput>): Promise<void>;
269
+ unregisterWidgetPush(input: UnregisterWidgetPushInput): Promise<void>;
270
+ refreshWidgets(input: WithPerson<RefreshWidgetsInput>): Promise<RefreshWidgetsResult>;
271
+ opened(input: {
272
+ project: string;
273
+ send_id: string;
274
+ }): Promise<{
275
+ person_id: PersonId;
276
+ } | null>;
277
+ forget(input: {
278
+ project: string;
279
+ person_id: PersonId;
280
+ }): Promise<void>;
281
+ mergePerson(input: {
282
+ project: string;
283
+ from: PersonId;
284
+ into: PersonId;
285
+ }): Promise<void>;
286
+ pushTouches(input: {
287
+ project: string;
288
+ person_id: PersonId;
289
+ since: number;
290
+ }): Promise<PushTouch[]>;
291
+ }
292
+ export declare const LEGAL_ADMIN_BINDING = "LEGAL_ADMIN";
293
+ export declare const LEGAL_ADMIN_ENTRYPOINT = "LegalAdminRpc";
294
+ export interface LegalPutProductResult extends LegalPushResponse {
295
+ problems: Problem[];
296
+ }
297
+ export interface AppGrowStackLegalAdminService {
298
+ putProduct(input: {
299
+ product: unknown;
300
+ dry_run: boolean;
301
+ }): Promise<LegalPutProductResult>;
302
+ }
303
+ export declare const NOTIFY_ADMIN_BINDING = "NOTIFY_ADMIN";
304
+ export declare const NOTIFY_ADMIN_ENTRYPOINT = "NotifyAdminRpc";
305
+ export interface NotifyProposedVariants {
306
+ project: string;
307
+ list: NotifyVariantList;
308
+ }
309
+ export interface AppGrowStackNotifyAdminService {
310
+ listProposedVariants(input: {
311
+ projects: string[];
312
+ }): Promise<NotifyProposedVariants[]>;
313
+ listVariants(input: {
314
+ project: string;
315
+ campaign?: string;
316
+ status?: NotifyVariantStatus;
317
+ }): Promise<NotifyVariantList>;
318
+ getVariant(input: {
319
+ project: string;
320
+ variant_id: string;
321
+ }): Promise<NotifyVariant>;
322
+ approveVariant(input: {
323
+ project: string;
324
+ variant_id: string;
325
+ retire?: string;
326
+ by: string;
327
+ }): Promise<ApproveVariantResponse>;
328
+ rejectVariant(input: {
329
+ project: string;
330
+ variant_id: string;
331
+ by: string;
332
+ }): Promise<NotifyVariant>;
333
+ retireVariant(input: {
334
+ project: string;
335
+ variant_id: string;
336
+ by: string;
337
+ }): Promise<NotifyVariant>;
338
+ listCampaignStates(input: {
339
+ project: string;
340
+ }): Promise<NotifyCampaignStateList>;
341
+ setCampaignPaused(input: {
342
+ project: string;
343
+ campaign: string;
344
+ paused: boolean;
345
+ by: string;
346
+ }): Promise<NotifyCampaignState>;
347
+ listRuns(input: {
348
+ limit: number;
349
+ }): Promise<NotifyRunList>;
350
+ pushPlan(input: {
351
+ project: string;
352
+ request: NotifyPlanPushRequest;
353
+ dry_run: boolean;
354
+ by: string;
355
+ }): Promise<NotifyPlanPushResponse>;
356
+ latestPlan(input: {
357
+ project: string;
358
+ }): Promise<PushedSource | null>;
359
+ preview(input: {
360
+ project: string;
361
+ campaign: string;
362
+ at: number;
363
+ }): Promise<NotifyPreview>;
364
+ explain(input: {
365
+ project: string;
366
+ person_id: PersonId;
367
+ }): Promise<NotifyExplain>;
368
+ stats(input: {
369
+ project: string;
370
+ campaign: string;
371
+ days: number;
372
+ }): Promise<NotifyStats>;
373
+ guardrails(input: {
374
+ project: string;
375
+ }): Promise<NotifyGuardrailReport>;
376
+ aiUsage(input: {
377
+ month: string;
378
+ }): Promise<{
379
+ month: string;
380
+ usd_micros: number;
381
+ }>;
382
+ setAiStop(input: {
383
+ month: string;
384
+ stop: boolean;
385
+ }): Promise<void>;
386
+ }
387
+ export declare const CREATIVE_ADMIN_BINDING = "CREATIVE_ADMIN";
388
+ export declare const CREATIVE_SERVICE = "appgrowstack-creative";
389
+ export declare const CREATIVE_ADMIN_ENTRYPOINT = "CreativeAdminRpc";
390
+ export interface CaptureSetFilter {
391
+ platform?: Platform;
392
+ version?: string;
393
+ purpose?: CapturePurpose;
394
+ set?: string;
395
+ }
396
+ export interface StoreTextSlot {
397
+ platform: Platform;
398
+ page: string;
399
+ locale: string;
400
+ field: StoreTextField;
401
+ }
402
+ export interface AppGrowStackCreativeAdminService {
403
+ createCaptureSet(input: {
404
+ project: string;
405
+ request: CreateCaptureSetRequest;
406
+ by: string;
407
+ }): Promise<CreateCaptureSetResult>;
408
+ completeCaptureSet(input: {
409
+ project: string;
410
+ set: string;
411
+ by: string;
412
+ }): Promise<CaptureSet>;
413
+ putCaptureFile(input: {
414
+ project: string;
415
+ set: string;
416
+ file: CaptureFile;
417
+ content_type: string;
418
+ bytes: number;
419
+ body: ReadableStream<Uint8Array>;
420
+ by: string;
421
+ }): Promise<void>;
422
+ listCaptureSets(input: {
423
+ project: string;
424
+ } & CaptureSetFilter): Promise<CaptureSetList>;
425
+ getCaptureFile(input: {
426
+ project: string;
427
+ set: string;
428
+ file: CaptureFile;
429
+ }): Promise<{
430
+ content_type: string;
431
+ bytes: number;
432
+ body: ReadableStream<Uint8Array>;
433
+ }>;
434
+ createArchive(input: {
435
+ project: string;
436
+ request: CreateCreativeArchiveRequest;
437
+ by: string;
438
+ }): Promise<CreateCreativeArchiveResult>;
439
+ putArchiveFile(input: {
440
+ project: string;
441
+ archive: string;
442
+ sha256: string;
443
+ content_type: string;
444
+ bytes: number;
445
+ body: ReadableStream<Uint8Array>;
446
+ by: string;
447
+ }): Promise<void>;
448
+ completeArchive(input: {
449
+ project: string;
450
+ archive: string;
451
+ by: string;
452
+ }): Promise<CreativeArchive>;
453
+ listArchives(input: {
454
+ project: string;
455
+ }): Promise<CreativeArchiveList>;
456
+ getArchive(input: {
457
+ project: string;
458
+ archive: string;
459
+ }): Promise<CreativeArchive>;
460
+ getArchiveFile(input: {
461
+ project: string;
462
+ archive: string;
463
+ sha256: string;
464
+ }): Promise<{
465
+ content_type: string;
466
+ bytes: number;
467
+ body: ReadableStream<Uint8Array>;
468
+ }>;
469
+ getBrand(input: {
470
+ project: string;
471
+ }): Promise<CreativeBrand>;
472
+ putBrand(input: {
473
+ project: string;
474
+ body: CreativeBrandBody;
475
+ by: string;
476
+ }): Promise<CreativeBrand>;
477
+ createAssetUpload(input: {
478
+ project: string;
479
+ request: CreateCreativeAssetUploadRequest;
480
+ by: string;
481
+ }): Promise<CreativeAssetUpload>;
482
+ putAssetFile(input: {
483
+ project: string;
484
+ asset: string;
485
+ content_type: string;
486
+ bytes: number;
487
+ body: ReadableStream<Uint8Array>;
488
+ by: string;
489
+ }): Promise<void>;
490
+ listAssets(input: {
491
+ project: string;
492
+ }): Promise<CreativeAssetList>;
493
+ getAssetFile(input: {
494
+ project: string;
495
+ asset: string;
496
+ }): Promise<{
497
+ content_type: string;
498
+ bytes: number;
499
+ body: ReadableStream<Uint8Array>;
500
+ }>;
501
+ listPages(input: {
502
+ project: string;
503
+ }): Promise<CreativePageList>;
504
+ putPage(input: {
505
+ project: string;
506
+ platform: Platform;
507
+ page: string;
508
+ request: PutCreativePageRequest;
509
+ by: string;
510
+ }): Promise<CreativePage>;
511
+ listStoreTexts(input: {
512
+ project: string;
513
+ platform?: Platform;
514
+ page?: string;
515
+ locale?: string;
516
+ field?: StoreTextField;
517
+ status?: StoreTextStatus;
518
+ }): Promise<StoreTextList>;
519
+ getStoreTextHistory(input: {
520
+ project: string;
521
+ } & StoreTextSlot): Promise<StoreTextList>;
522
+ proposeStoreText(input: {
523
+ project: string;
524
+ request: ProposeStoreTextRequest;
525
+ by: string;
526
+ } & StoreTextSlot): Promise<StoreText>;
527
+ approveStoreText(input: {
528
+ project: string;
529
+ revision: string;
530
+ by: string;
531
+ }): Promise<StoreText>;
532
+ rejectStoreText(input: {
533
+ project: string;
534
+ revision: string;
535
+ by: string;
536
+ }): Promise<StoreText>;
537
+ generateVariant(input: {
538
+ project: string;
539
+ request: GenerateCreativeVariantRequest;
540
+ by: string;
541
+ }): Promise<CreativeRun>;
542
+ listVariants(input: {
543
+ project: string;
544
+ platform?: Platform;
545
+ page?: string;
546
+ surface?: CreativeSurface;
547
+ status?: CreativeVariantStatus;
548
+ }): Promise<CreativeVariantList>;
549
+ getVariant(input: {
550
+ project: string;
551
+ variant: string;
552
+ }): Promise<CreativeVariant>;
553
+ acceptVariant(input: {
554
+ project: string;
555
+ variant: string;
556
+ by: string;
557
+ }): Promise<CreativeVariant>;
558
+ rejectVariant(input: {
559
+ project: string;
560
+ variant: string;
561
+ reason?: string;
562
+ by: string;
563
+ }): Promise<CreativeVariant>;
564
+ withdrawVariant(input: {
565
+ project: string;
566
+ variant: string;
567
+ reason: string;
568
+ by: string;
569
+ }): Promise<CreativeVariant>;
570
+ submitCreatives(input: {
571
+ project: string;
572
+ request: SubmitCreativesRequest;
573
+ by: string;
574
+ }): Promise<SubmitCreativesResult>;
575
+ registerTest(input: {
576
+ project: string;
577
+ test: string;
578
+ request: RegisterCreativeTestRequest;
579
+ by: string;
580
+ }): Promise<CreativeTest>;
581
+ stopTest(input: {
582
+ project: string;
583
+ test: string;
584
+ by: string;
585
+ }): Promise<CreativeTest>;
586
+ listTests(input: {
587
+ project: string;
588
+ status?: CreativeTestStatus;
589
+ }): Promise<CreativeTestList>;
590
+ getTest(input: {
591
+ project: string;
592
+ test: string;
593
+ }): Promise<CreativeTestDetail>;
594
+ listCreativeMetrics(input: {
595
+ project: string;
596
+ page?: string;
597
+ variant?: string;
598
+ since?: string;
599
+ country?: string;
600
+ source?: string;
601
+ }): Promise<CreativeMetricList>;
602
+ getTagEffects(input: {
603
+ projects: string[];
604
+ snapshot?: string;
605
+ }): Promise<TagEffectSnapshot>;
606
+ listKeywords(input: {
607
+ project: string;
608
+ country?: string;
609
+ week?: string;
610
+ }): Promise<CreativeKeywordList>;
611
+ syncKeywords(input: {
612
+ project: string;
613
+ by: string;
614
+ }): Promise<CreativeKeywordSyncResult>;
615
+ listSteps(input: {
616
+ project: string;
617
+ status?: "waiting" | "done" | "canceled";
618
+ }): Promise<CreativeStepList>;
619
+ completeStep(input: {
620
+ project: string;
621
+ step: string;
622
+ request: CompleteCreativeStepRequest;
623
+ by: string;
624
+ }): Promise<CreativeStep>;
625
+ runCreativeWeekly(input: {
626
+ projects: string[];
627
+ by: string;
628
+ }): Promise<CreativeRun>;
629
+ listCreativeRuns(input: {
630
+ limit: number;
631
+ projects: string[];
632
+ }): Promise<CreativeRunList>;
633
+ aiUsage(input: {
634
+ month: string;
635
+ }): Promise<{
636
+ month: string;
637
+ usd_micros: number;
638
+ }>;
639
+ setAiStop(input: {
640
+ month: string;
641
+ stop: "none" | "weekly" | "all";
642
+ }): Promise<void>;
643
+ createReference(input: {
644
+ projects: string[];
645
+ request: CreateReferenceRequest;
646
+ by: string;
647
+ }): Promise<CreateReferenceResult>;
648
+ putReferenceFile(input: {
649
+ projects: string[];
650
+ reference: string;
651
+ sha256: string;
652
+ content_type: string;
653
+ bytes: number;
654
+ body: ReadableStream<Uint8Array>;
655
+ by: string;
656
+ }): Promise<void>;
657
+ completeReference(input: {
658
+ projects: string[];
659
+ reference: string;
660
+ by: string;
661
+ }): Promise<CreativeReference>;
662
+ listReferences(input: {
663
+ projects: string[];
664
+ project?: string;
665
+ subject?: string;
666
+ tag?: string;
667
+ source?: CreativeReferenceSource;
668
+ origin?: CreativeReferenceOrigin;
669
+ since?: string;
670
+ q?: string;
671
+ cursor?: string;
672
+ }): Promise<CreativeReferenceList>;
673
+ getReference(input: {
674
+ projects: string[];
675
+ reference: string;
676
+ }): Promise<CreativeReference>;
677
+ getReferenceFile(input: {
678
+ projects: string[];
679
+ reference: string;
680
+ sha256: string;
681
+ }): Promise<{
682
+ content_type: string;
683
+ bytes: number;
684
+ body: ReadableStream<Uint8Array>;
685
+ }>;
686
+ updateReference(input: {
687
+ projects: string[];
688
+ reference: string;
689
+ request: UpdateReferenceRequest;
690
+ by: string;
691
+ }): Promise<CreativeReference>;
692
+ }
693
+ export declare const INSIGHTS_BINDING = "INSIGHTS";
694
+ export declare const INSIGHTS_SERVICE = "appgrowstack-insights";
695
+ export declare const INSIGHTS_ENTRYPOINT = "InsightsRpc";
696
+ export interface AppGrowStackInsightsService {
697
+ personKeys(input: {
698
+ project: string;
699
+ person_ids: PersonId[];
700
+ }): Promise<PersonKey[]>;
701
+ ledgerPut(input: {
702
+ hypothesis: LedgerHypothesisInput;
703
+ source: LedgerSource;
704
+ by: string;
705
+ }): Promise<LedgerHypothesis>;
706
+ ledgerLearn(input: {
707
+ learning: LedgerLearningInput;
708
+ source: LedgerLearningSource;
709
+ by: string;
710
+ }): Promise<LedgerLearning>;
711
+ ledgerConclude(input: {
712
+ conclusion: LedgerConclusionInput;
713
+ by: string;
714
+ }): Promise<LedgerHypothesis>;
715
+ ledgerGet(input: {
716
+ hypothesis: string;
717
+ }): Promise<LedgerHypothesis | null>;
718
+ ledgerLink(input: {
719
+ hypothesis: string;
720
+ links: LedgerLink[];
721
+ by: string;
722
+ }): Promise<void>;
723
+ ledgerLinked(input: {
724
+ kind: LedgerLinkKind;
725
+ refs: string[];
726
+ }): Promise<{
727
+ ref: string;
728
+ hypothesis: string;
729
+ }[]>;
730
+ ledgerIndex(input: {
731
+ kind: "reference";
732
+ ref: string;
733
+ project: string | null;
734
+ body: string;
735
+ }): Promise<void>;
736
+ ledgerLearnings(input: {
737
+ limit: number;
738
+ surface?: LedgerSurface;
739
+ }): Promise<LedgerLearning[]>;
740
+ }
741
+ export declare const INSIGHTS_ADMIN_BINDING = "INSIGHTS_ADMIN";
742
+ export declare const INSIGHTS_ADMIN_ENTRYPOINT = "InsightsAdminRpc";
743
+ export interface InsightsMetricQuery {
744
+ project: string;
745
+ metric: string;
746
+ from?: string;
747
+ to?: string;
748
+ dims?: string[];
749
+ audience?: Audience[];
750
+ }
751
+ export interface AppGrowStackInsightsAdminService {
752
+ getInsightsMetric(input: InsightsMetricQuery & {
753
+ by: string;
754
+ }): Promise<InsightsMetricAnswer>;
755
+ compareInsightsMetric(input: {
756
+ project: string;
757
+ metric: string;
758
+ at: string;
759
+ weeks: number;
760
+ by: string;
761
+ }): Promise<InsightsMetricCompare>;
762
+ runInsightsSql(input: {
763
+ request: InsightsSqlRequest;
764
+ projects: string[];
765
+ by: string;
766
+ }): Promise<InsightsSqlResult>;
767
+ listInsightsSignals(input: {
768
+ projects: string[];
769
+ kind?: InsightsSignalKind;
770
+ since?: string;
771
+ }): Promise<InsightsSignalList>;
772
+ listInsightsFindings(input: {
773
+ projects: string[];
774
+ status?: InsightsFindingStatus;
775
+ since?: string;
776
+ }): Promise<InsightsFindingList>;
777
+ getInsightsFinding(input: {
778
+ finding: string;
779
+ projects: string[];
780
+ }): Promise<InsightsFindingDetail>;
781
+ decideInsightsFinding(input: {
782
+ finding: string;
783
+ projects: string[];
784
+ request: InsightsFindingDecision;
785
+ by: string;
786
+ }): Promise<InsightsFinding>;
787
+ getInsightsPortfolio(input: {
788
+ projects: string[];
789
+ week?: string;
790
+ }): Promise<PortfolioReport>;
791
+ getCompetitors(input: {
792
+ project: string;
793
+ }): Promise<CompetitorReport>;
794
+ getAcquisition(input: {
795
+ project: string;
796
+ days?: number;
797
+ month?: string;
798
+ }): Promise<AcquisitionReport>;
799
+ listAcquisitionNodes(input: {
800
+ project: string;
801
+ channel: string;
802
+ level: AcquisitionNodeLevel;
803
+ days?: number;
804
+ month?: string;
805
+ parent?: string;
806
+ }): Promise<AcquisitionNodeList>;
807
+ listWebPages(input: {
808
+ project: string;
809
+ origin?: string;
810
+ }): Promise<WebPageList>;
811
+ getKpiTree(input: {
812
+ project: string;
813
+ from?: string;
814
+ to?: string;
815
+ }): Promise<KpiTree>;
816
+ putKpiTree(input: {
817
+ project: string;
818
+ request: PutKpiTreeRequest;
819
+ by: string;
820
+ }): Promise<KpiTree>;
821
+ computeKpis(input: {
822
+ project: string;
823
+ request: ComputeKpisRequest;
824
+ by: string;
825
+ }): Promise<ComputeKpisResult>;
826
+ collectInsights(input: {
827
+ request: InsightsCollectRequest;
828
+ projects: string[];
829
+ by: string;
830
+ }): Promise<InsightsCollectResult>;
831
+ pushInsights(input: {
832
+ source: string;
833
+ request: InsightsPushRequest;
834
+ by: string;
835
+ }): Promise<InsightsCollection>;
836
+ listLedgerHypotheses(input: {
837
+ projects: string[];
838
+ surface?: LedgerSurface;
839
+ status?: LedgerHypothesisStatus;
840
+ outcome?: LedgerOutcome;
841
+ }): Promise<LedgerHypothesisList>;
842
+ addLedgerHypothesis(input: {
843
+ request: LedgerHypothesisInput;
844
+ projects: string[];
845
+ by: string;
846
+ }): Promise<LedgerHypothesis>;
847
+ getLedgerHypothesis(input: {
848
+ hypothesis: string;
849
+ projects: string[];
850
+ }): Promise<LedgerHypothesisDetail>;
851
+ updateLedgerHypothesis(input: {
852
+ hypothesis: string;
853
+ request: LedgerHypothesisUpdate;
854
+ projects: string[];
855
+ by: string;
856
+ }): Promise<LedgerHypothesis>;
857
+ markLedgerApplied(input: {
858
+ hypothesis: string;
859
+ request: LedgerAppliedRequest;
860
+ projects: string[];
861
+ by: string;
862
+ }): Promise<LedgerHypothesis>;
863
+ listLedgerLearnings(input: {
864
+ projects: string[];
865
+ surface?: LedgerSurface;
866
+ since?: string;
867
+ }): Promise<LedgerLearningList>;
868
+ addLedgerLearning(input: {
869
+ request: LedgerLearningInput;
870
+ projects: string[];
871
+ by: string;
872
+ }): Promise<LedgerLearning>;
873
+ searchLedger(input: {
874
+ q: string;
875
+ projects: string[];
876
+ surface?: LedgerSurface;
877
+ kind?: LedgerSearchKind;
878
+ limit: number;
879
+ }): Promise<LedgerSearchResult>;
880
+ putLedgerKnowledge(input: {
881
+ request: LedgerKnowledgeSync;
882
+ by: string;
883
+ }): Promise<LedgerKnowledgeSyncResult>;
884
+ listLedgerKnowledge(input: {
885
+ projects: string[];
886
+ file?: string;
887
+ linked: boolean;
888
+ }): Promise<LedgerKnowledgeList>;
889
+ aiUsage(input: {
890
+ month: string;
891
+ }): Promise<{
892
+ month: string;
893
+ usd_micros: number;
894
+ }>;
895
+ forget(input: {
896
+ project: string;
897
+ person_id: PersonId;
898
+ }): Promise<void>;
899
+ }
900
+ export declare const APP_RPC_SUMMARIES: Readonly<Partial<Record<keyof AppGrowStackService, string>>>;
901
+ export declare const API_RPC_SUMMARIES: Readonly<Partial<Record<keyof AppGrowStackApiService, string>>>;