palbase 0.8.1 → 0.9.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/ai/index.js +2 -2
- package/dist/backend/engine.js +2 -2
- package/dist/backend/env.js +1 -1
- package/dist/backend/index.js +3 -3
- package/dist/backend/stack.js +1 -1
- package/dist/backend/test.js +2 -2
- package/dist/chunks/2DWAHEYE.js +22 -0
- package/dist/chunks/{73R33XMD.js → 2GF6TA4C.js} +1 -1
- package/dist/chunks/4DDSGFFD.js +95 -0
- package/dist/chunks/{7XVI5JLP.js → 5UI3Q5JO.js} +2 -2
- package/dist/chunks/{RZ525VLP.js → 6RX5KVMR.js} +2 -2
- package/dist/chunks/{6RXVXPHC.js → BKOIWNJP.js} +1 -1
- package/dist/chunks/{ZSKMWUIQ.js → CJPHHWRE.js} +2 -2
- package/dist/chunks/{NSQAN2ME.js → CNUOWB6T.js} +2 -2
- package/dist/chunks/{RYI2OB52.js → I56MGYTD.js} +2 -2
- package/dist/chunks/{KJWHR5BP.js → KUFTU2AJ.js} +2 -2
- package/dist/chunks/MALOKTVW.js +13 -0
- package/dist/chunks/{CA4VJGGG.js → OV2D7HYG.js} +1 -1
- package/dist/chunks/PUILCUFX.js +2 -0
- package/dist/chunks/{T2Q5CKLL.js → SE3MXMQD.js} +2 -2
- package/dist/chunks/{KHHJRNAO.js → WPE6J77U.js} +1 -1
- package/dist/chunks/{KYJJJUEU.js → XGWTZGWR.js} +2 -2
- package/dist/chunks/{M4XLAPDF.js → XSPSDUZA.js} +2 -2
- package/dist/chunks/{MAYLG7WE.js → YSTCOQFT.js} +2 -2
- package/dist/chunks/ZHHMA7V4.js +2 -0
- package/dist/chunks/{5RTSNQ4X.js → ZRV54HT6.js} +2 -2
- package/dist/cli.js +129 -127
- package/dist/refuse/ai.js +1 -1
- package/dist/refuse/backend.js +1 -1
- package/dist/refuse/server.js +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/testing.js +2 -2
- package/dist/web/index.js +2 -2
- package/dist/web/message.js +2 -0
- package/dist/web/palbe.js +2 -2
- package/dist/web/paywall.js +2 -2
- package/dist/web/push-sw.js +2 -0
- package/dist/web/ssr.js +2 -2
- package/dist/web/vite.js +2 -2
- package/package.json +7 -2
- package/types/backend/src/services.d.ts +2 -2
- package/types/internal/src/modules/ai.d.ts +1 -1
- package/types/internal/src/modules/analytics.d.ts +618 -1
- package/types/internal/src/modules/auth.d.ts +409 -90
- package/types/internal/src/modules/events.d.ts +7 -3
- package/types/internal/src/modules/flags.d.ts +380 -14
- package/types/internal/src/modules/notify.d.ts +2270 -99
- package/types/internal/src/modules/purchases.d.ts +672 -9
- package/types/server/src/webhooks.d.ts +1 -1
- package/types/web/src/analytics.d.ts +56 -5
- package/types/web/src/client.d.ts +26 -4
- package/types/web/src/consent.d.ts +218 -0
- package/types/web/src/flags.d.ts +75 -0
- package/types/web/src/inapp.d.ts +129 -0
- package/types/web/src/inbox.d.ts +59 -0
- package/types/web/src/index.d.ts +9 -3
- package/types/web/src/installation.d.ts +16 -0
- package/types/web/src/message/index.d.ts +5 -0
- package/types/web/src/message/present.d.ts +20 -0
- package/types/web/src/notify.d.ts +67 -0
- package/types/web/src/paywall/index.d.ts +4 -4
- package/types/web/src/paywall/placement.d.ts +11 -12
- package/types/web/src/paywall/prices.d.ts +7 -2
- package/types/web/src/purchases.d.ts +32 -0
- package/types/web/src/{paywall → screen}/assets.d.ts +6 -6
- package/types/web/src/screen/render.d.ts +186 -0
- package/types/web/src/{paywall → screen}/resolve.d.ts +56 -8
- package/dist/chunks/5M3HV3X4.js +0 -2
- package/dist/chunks/Q4XTWEAW.js +0 -92
- package/dist/chunks/Y6AQWQBE.js +0 -2
- package/types/web/src/paywall/render.d.ts +0 -93
- /package/types/web/src/{paywall → screen}/icons.d.ts +0 -0
|
@@ -1,4 +1,221 @@
|
|
|
1
1
|
import { type Reply, type Transport } from '../transport.js';
|
|
2
|
+
/**
|
|
3
|
+
* One of the project's audiences.
|
|
4
|
+
*/
|
|
5
|
+
export type Audience = {
|
|
6
|
+
/**
|
|
7
|
+
* When it was last worked out.
|
|
8
|
+
*/
|
|
9
|
+
computed_at?: string;
|
|
10
|
+
/**
|
|
11
|
+
* When it was made.
|
|
12
|
+
*/
|
|
13
|
+
created_at: string;
|
|
14
|
+
/**
|
|
15
|
+
* What it is for.
|
|
16
|
+
*/
|
|
17
|
+
description: string;
|
|
18
|
+
/**
|
|
19
|
+
* The audience.
|
|
20
|
+
*/
|
|
21
|
+
id: string;
|
|
22
|
+
/**
|
|
23
|
+
* Why the last working out failed, until one succeeds.
|
|
24
|
+
*/
|
|
25
|
+
last_error?: string;
|
|
26
|
+
/**
|
|
27
|
+
* How many people are in it, as of computed_at.
|
|
28
|
+
*/
|
|
29
|
+
members: number;
|
|
30
|
+
/**
|
|
31
|
+
* Its name.
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
rule: AudienceRule;
|
|
35
|
+
/**
|
|
36
|
+
* ready: its members are the rule's as it stands; pending: a rule made or changed is being worked out.
|
|
37
|
+
*/
|
|
38
|
+
state: "ready" | "pending";
|
|
39
|
+
/**
|
|
40
|
+
* When it was last changed.
|
|
41
|
+
*/
|
|
42
|
+
updated_at: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* audience.entered, audience.exited: a person entered an audience, or left it.
|
|
46
|
+
*/
|
|
47
|
+
export type AudienceChangedEvent = {
|
|
48
|
+
/**
|
|
49
|
+
* The audience.
|
|
50
|
+
*/
|
|
51
|
+
audience_id: string;
|
|
52
|
+
/**
|
|
53
|
+
* Its name when it happened.
|
|
54
|
+
*/
|
|
55
|
+
audience_name: string;
|
|
56
|
+
/**
|
|
57
|
+
* The person: a user's id, or the anonymous id of an app no one signed in on.
|
|
58
|
+
*/
|
|
59
|
+
person_id: string;
|
|
60
|
+
/**
|
|
61
|
+
* The user they signed in as, when they did.
|
|
62
|
+
*/
|
|
63
|
+
user_id?: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* One thing a person is picked by; its type says which of its fields it reads.
|
|
67
|
+
*/
|
|
68
|
+
export type AudienceCondition = {
|
|
69
|
+
/**
|
|
70
|
+
* event, did: how many times at least (1 unless said, 10000 at most).
|
|
71
|
+
*/
|
|
72
|
+
at_least?: number;
|
|
73
|
+
/**
|
|
74
|
+
* event: true for did the event, false for did not.
|
|
75
|
+
*/
|
|
76
|
+
did?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* event: the event's name (an app's own, or a platform event's type such as purchases.purchase.completed).
|
|
79
|
+
*/
|
|
80
|
+
event?: string;
|
|
81
|
+
/**
|
|
82
|
+
* place: country (ISO 3166-1 alpha-2), region (a province or state, its English name) or city.
|
|
83
|
+
*/
|
|
84
|
+
field?: "country" | "region" | "city";
|
|
85
|
+
/**
|
|
86
|
+
* property: the property's name.
|
|
87
|
+
*/
|
|
88
|
+
key?: string;
|
|
89
|
+
/**
|
|
90
|
+
* property: eq, neq, gt, gte, lt, lte (numbers), contains (text, any case), set, not_set. place and platform: eq, neq, in. neq holds for a person the value is not known of, as not eq.
|
|
91
|
+
*/
|
|
92
|
+
op?: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "contains" | "set" | "not_set" | "in";
|
|
93
|
+
/**
|
|
94
|
+
* What the condition reads: event (did, or did not, an event in the last while), property (a property of the person), place (where they were last), platform (the platform their apps last sent from).
|
|
95
|
+
*/
|
|
96
|
+
type: "event" | "property" | "place" | "platform";
|
|
97
|
+
/**
|
|
98
|
+
* What op compares with: a JSON scalar for a property (text compared as text, a number as a number); a string for place and platform eq and neq, a list of 1 to 50 for in. set and not_set take none.
|
|
99
|
+
*/
|
|
100
|
+
value?: unknown;
|
|
101
|
+
within?: AudienceWithin;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* An audience to make.
|
|
105
|
+
*/
|
|
106
|
+
export type AudienceCreate = {
|
|
107
|
+
/**
|
|
108
|
+
* What it is for.
|
|
109
|
+
*/
|
|
110
|
+
description?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Its name: one per project.
|
|
113
|
+
*/
|
|
114
|
+
name: string;
|
|
115
|
+
rule: AudienceRule;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* The project's audiences, by name.
|
|
119
|
+
*/
|
|
120
|
+
export type AudienceList = {
|
|
121
|
+
/**
|
|
122
|
+
* The audiences.
|
|
123
|
+
*/
|
|
124
|
+
audiences: Audience[];
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* A person in an audience.
|
|
128
|
+
*/
|
|
129
|
+
export type AudienceMember = {
|
|
130
|
+
/**
|
|
131
|
+
* When they entered.
|
|
132
|
+
*/
|
|
133
|
+
entered_at: string;
|
|
134
|
+
/**
|
|
135
|
+
* The installs their events came from (20 at most).
|
|
136
|
+
*/
|
|
137
|
+
installations: string[];
|
|
138
|
+
/**
|
|
139
|
+
* The person: a user's id, or the anonymous id of an app no one signed in on.
|
|
140
|
+
*/
|
|
141
|
+
person_id: string;
|
|
142
|
+
/**
|
|
143
|
+
* The user they signed in as, when they did.
|
|
144
|
+
*/
|
|
145
|
+
user_id?: string;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* A page of an audience's members, in the order of their id.
|
|
149
|
+
*/
|
|
150
|
+
export type AudienceMemberPage = {
|
|
151
|
+
/**
|
|
152
|
+
* The members.
|
|
153
|
+
*/
|
|
154
|
+
members: AudienceMember[];
|
|
155
|
+
/**
|
|
156
|
+
* The next page's cursor, when there is one.
|
|
157
|
+
*/
|
|
158
|
+
next_cursor?: string;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Who a rule would pick now.
|
|
162
|
+
*/
|
|
163
|
+
export type AudiencePreview = {
|
|
164
|
+
/**
|
|
165
|
+
* How many.
|
|
166
|
+
*/
|
|
167
|
+
people: number;
|
|
168
|
+
/**
|
|
169
|
+
* The first twenty, by person id.
|
|
170
|
+
*/
|
|
171
|
+
sample: string[];
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* A rule to try.
|
|
175
|
+
*/
|
|
176
|
+
export type AudiencePreviewRequest = {
|
|
177
|
+
rule: AudienceRule;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Who an audience is: the people every condition holds for (match all), or one at least (any).
|
|
181
|
+
*/
|
|
182
|
+
export type AudienceRule = {
|
|
183
|
+
/**
|
|
184
|
+
* 1 to 20.
|
|
185
|
+
*/
|
|
186
|
+
conditions: AudienceCondition[];
|
|
187
|
+
/**
|
|
188
|
+
* all unless said.
|
|
189
|
+
*/
|
|
190
|
+
match?: "all" | "any";
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* What to change of an audience: each field named.
|
|
194
|
+
*/
|
|
195
|
+
export type AudienceUpdate = {
|
|
196
|
+
/**
|
|
197
|
+
* What it is for.
|
|
198
|
+
*/
|
|
199
|
+
description?: string;
|
|
200
|
+
/**
|
|
201
|
+
* Its name: one per project.
|
|
202
|
+
*/
|
|
203
|
+
name?: string;
|
|
204
|
+
rule?: AudienceRule;
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* How far back an event condition looks: a year at most.
|
|
208
|
+
*/
|
|
209
|
+
export type AudienceWithin = {
|
|
210
|
+
/**
|
|
211
|
+
* How many units.
|
|
212
|
+
*/
|
|
213
|
+
amount: number;
|
|
214
|
+
/**
|
|
215
|
+
* The unit.
|
|
216
|
+
*/
|
|
217
|
+
unit: "minutes" | "hours" | "days";
|
|
218
|
+
};
|
|
2
219
|
export type AliasRequest = {
|
|
3
220
|
/**
|
|
4
221
|
* One id.
|
|
@@ -107,6 +324,67 @@ export type CaptureRequest = {
|
|
|
107
324
|
*/
|
|
108
325
|
timestamp?: number;
|
|
109
326
|
};
|
|
327
|
+
/**
|
|
328
|
+
* Every event a project's timelines can hold: the platform modules', and those its apps and backend sent in the window.
|
|
329
|
+
*/
|
|
330
|
+
export type Catalog = {
|
|
331
|
+
events: CatalogEvent[];
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* An event a person's timeline can hold.
|
|
335
|
+
*/
|
|
336
|
+
export type CatalogEvent = {
|
|
337
|
+
/**
|
|
338
|
+
* How many the window holds (the app's).
|
|
339
|
+
*/
|
|
340
|
+
count?: number;
|
|
341
|
+
/**
|
|
342
|
+
* What it is: the module's words, or the project's.
|
|
343
|
+
*/
|
|
344
|
+
description?: string;
|
|
345
|
+
fields: CatalogField[];
|
|
346
|
+
/**
|
|
347
|
+
* Its first in the window (the app's).
|
|
348
|
+
*/
|
|
349
|
+
first_seen?: string;
|
|
350
|
+
/**
|
|
351
|
+
* Whether the project hid it.
|
|
352
|
+
*/
|
|
353
|
+
hidden: boolean;
|
|
354
|
+
/**
|
|
355
|
+
* Its newest (the app's).
|
|
356
|
+
*/
|
|
357
|
+
last_seen?: string;
|
|
358
|
+
/**
|
|
359
|
+
* The module that tells it.
|
|
360
|
+
*/
|
|
361
|
+
module?: string;
|
|
362
|
+
/**
|
|
363
|
+
* The event.
|
|
364
|
+
*/
|
|
365
|
+
name: string;
|
|
366
|
+
/**
|
|
367
|
+
* A platform module's (module names it), or the app's: what the project's apps and backend sent.
|
|
368
|
+
*/
|
|
369
|
+
source: "platform" | "app";
|
|
370
|
+
};
|
|
371
|
+
/**
|
|
372
|
+
* A field an event carries.
|
|
373
|
+
*/
|
|
374
|
+
export type CatalogField = {
|
|
375
|
+
/**
|
|
376
|
+
* What it is (a platform event's).
|
|
377
|
+
*/
|
|
378
|
+
description?: string;
|
|
379
|
+
/**
|
|
380
|
+
* The field.
|
|
381
|
+
*/
|
|
382
|
+
name: string;
|
|
383
|
+
/**
|
|
384
|
+
* The JSON types its values were (a platform event's: its schema's).
|
|
385
|
+
*/
|
|
386
|
+
types: string[];
|
|
387
|
+
};
|
|
110
388
|
export type ConsoleAnswer = {
|
|
111
389
|
/**
|
|
112
390
|
* Records that passed.
|
|
@@ -269,6 +547,19 @@ export type EventBucket = {
|
|
|
269
547
|
*/
|
|
270
548
|
users: number;
|
|
271
549
|
};
|
|
550
|
+
/**
|
|
551
|
+
* What the project says of one of its events.
|
|
552
|
+
*/
|
|
553
|
+
export type EventDefinition = {
|
|
554
|
+
/**
|
|
555
|
+
* A description its people read beside the event.
|
|
556
|
+
*/
|
|
557
|
+
description: string;
|
|
558
|
+
/**
|
|
559
|
+
* Whether the catalog hides it.
|
|
560
|
+
*/
|
|
561
|
+
hidden: boolean;
|
|
562
|
+
};
|
|
272
563
|
export type EventNames = {
|
|
273
564
|
/**
|
|
274
565
|
* In order.
|
|
@@ -417,6 +708,48 @@ export type PageRequest = {
|
|
|
417
708
|
*/
|
|
418
709
|
url: string;
|
|
419
710
|
};
|
|
711
|
+
/**
|
|
712
|
+
* The people a search found, most recently seen first.
|
|
713
|
+
*/
|
|
714
|
+
export type PeopleFound = {
|
|
715
|
+
people: PersonFound[];
|
|
716
|
+
};
|
|
717
|
+
/**
|
|
718
|
+
* Properties of a person. The person is the signed-in user; with no one signed in, the app's anonymous id (distinct_id); the project's server names whom.
|
|
719
|
+
*/
|
|
720
|
+
export type PeopleRequest = {
|
|
721
|
+
/**
|
|
722
|
+
* Numbers added to what is set (none is 0).
|
|
723
|
+
*/
|
|
724
|
+
add?: {
|
|
725
|
+
[key: string]: unknown;
|
|
726
|
+
};
|
|
727
|
+
/**
|
|
728
|
+
* Whose properties: the anonymous id with no one signed in; the person the server means.
|
|
729
|
+
*/
|
|
730
|
+
distinct_id?: string;
|
|
731
|
+
/**
|
|
732
|
+
* When the device sent it, in unix milliseconds: its clock is corrected by it.
|
|
733
|
+
*/
|
|
734
|
+
sent_at?: number;
|
|
735
|
+
/**
|
|
736
|
+
* A JSON object.
|
|
737
|
+
*/
|
|
738
|
+
set?: {
|
|
739
|
+
[key: string]: unknown;
|
|
740
|
+
};
|
|
741
|
+
/**
|
|
742
|
+
* Set when not set already: where a person first came from.
|
|
743
|
+
*/
|
|
744
|
+
set_once?: {
|
|
745
|
+
[key: string]: unknown;
|
|
746
|
+
};
|
|
747
|
+
/**
|
|
748
|
+
* When, in unix milliseconds; now when absent.
|
|
749
|
+
*/
|
|
750
|
+
timestamp?: number;
|
|
751
|
+
unset?: string[];
|
|
752
|
+
};
|
|
420
753
|
export type PerfAnswer = {
|
|
421
754
|
/**
|
|
422
755
|
* Samples kept.
|
|
@@ -573,6 +906,78 @@ export type PerfTimeline = {
|
|
|
573
906
|
*/
|
|
574
907
|
rows: PerfBucket[];
|
|
575
908
|
};
|
|
909
|
+
/**
|
|
910
|
+
* What is known of a person.
|
|
911
|
+
*/
|
|
912
|
+
export type Person = {
|
|
913
|
+
/**
|
|
914
|
+
* Its app version.
|
|
915
|
+
*/
|
|
916
|
+
app_version?: string;
|
|
917
|
+
/**
|
|
918
|
+
* The city or district of their newest event that had a place (English name; DB-IP's city database), absent when none had.
|
|
919
|
+
*/
|
|
920
|
+
city?: string;
|
|
921
|
+
/**
|
|
922
|
+
* Its country: ISO 3166-1 alpha-2, of their newest event that had a place.
|
|
923
|
+
*/
|
|
924
|
+
country?: string;
|
|
925
|
+
/**
|
|
926
|
+
* The ids they went by: their own, and the anonymous ones identified as them.
|
|
927
|
+
*/
|
|
928
|
+
distinct_ids: string[];
|
|
929
|
+
/**
|
|
930
|
+
* Their first event.
|
|
931
|
+
*/
|
|
932
|
+
first_seen?: string;
|
|
933
|
+
/**
|
|
934
|
+
* The installs their events came from.
|
|
935
|
+
*/
|
|
936
|
+
installations: string[];
|
|
937
|
+
/**
|
|
938
|
+
* Their newest event.
|
|
939
|
+
*/
|
|
940
|
+
last_seen?: string;
|
|
941
|
+
/**
|
|
942
|
+
* Its OS version.
|
|
943
|
+
*/
|
|
944
|
+
os_version?: string;
|
|
945
|
+
/**
|
|
946
|
+
* The person.
|
|
947
|
+
*/
|
|
948
|
+
person_id: string;
|
|
949
|
+
/**
|
|
950
|
+
* The platform of their newest event.
|
|
951
|
+
*/
|
|
952
|
+
platform?: string;
|
|
953
|
+
/**
|
|
954
|
+
* What was set of them, as it stands.
|
|
955
|
+
*/
|
|
956
|
+
properties: {
|
|
957
|
+
[key: string]: unknown;
|
|
958
|
+
};
|
|
959
|
+
/**
|
|
960
|
+
* The region (a province, a state: its English name) of their newest event that had a place.
|
|
961
|
+
*/
|
|
962
|
+
region?: string;
|
|
963
|
+
};
|
|
964
|
+
/**
|
|
965
|
+
* A person a search found.
|
|
966
|
+
*/
|
|
967
|
+
export type PersonFound = {
|
|
968
|
+
/**
|
|
969
|
+
* The email they were found by.
|
|
970
|
+
*/
|
|
971
|
+
email?: string;
|
|
972
|
+
/**
|
|
973
|
+
* Their newest event.
|
|
974
|
+
*/
|
|
975
|
+
last_seen: string;
|
|
976
|
+
/**
|
|
977
|
+
* The person: the user an anonymous id was identified as, or the id itself.
|
|
978
|
+
*/
|
|
979
|
+
person_id: string;
|
|
980
|
+
};
|
|
576
981
|
export type RequestLine = {
|
|
577
982
|
/**
|
|
578
983
|
* The address it came from.
|
|
@@ -743,6 +1148,63 @@ export type Summary = {
|
|
|
743
1148
|
*/
|
|
744
1149
|
window_seconds: number;
|
|
745
1150
|
};
|
|
1151
|
+
/**
|
|
1152
|
+
* One of a person's events.
|
|
1153
|
+
*/
|
|
1154
|
+
export type TimelineEvent = {
|
|
1155
|
+
/**
|
|
1156
|
+
* The id it was sent under.
|
|
1157
|
+
*/
|
|
1158
|
+
distinct_id?: string;
|
|
1159
|
+
/**
|
|
1160
|
+
* Its name.
|
|
1161
|
+
*/
|
|
1162
|
+
event: string;
|
|
1163
|
+
/**
|
|
1164
|
+
* The event.
|
|
1165
|
+
*/
|
|
1166
|
+
event_id: string;
|
|
1167
|
+
/**
|
|
1168
|
+
* The install it came from.
|
|
1169
|
+
*/
|
|
1170
|
+
installation_id?: string;
|
|
1171
|
+
/**
|
|
1172
|
+
* The platform (server for the platform's).
|
|
1173
|
+
*/
|
|
1174
|
+
platform?: string;
|
|
1175
|
+
/**
|
|
1176
|
+
* A JSON object.
|
|
1177
|
+
*/
|
|
1178
|
+
properties: {
|
|
1179
|
+
[key: string]: unknown;
|
|
1180
|
+
};
|
|
1181
|
+
/**
|
|
1182
|
+
* The session.
|
|
1183
|
+
*/
|
|
1184
|
+
session_id?: string;
|
|
1185
|
+
/**
|
|
1186
|
+
* Who wrote it: the app's SDK, the project's backend, or the platform (a module's event about the person).
|
|
1187
|
+
*/
|
|
1188
|
+
source: "app" | "server" | "platform";
|
|
1189
|
+
/**
|
|
1190
|
+
* When (RFC 3339, milliseconds).
|
|
1191
|
+
*/
|
|
1192
|
+
timestamp: string;
|
|
1193
|
+
};
|
|
1194
|
+
/**
|
|
1195
|
+
* A page of a person's events, newest first: what their apps sent, what their backend sent, what the platform did for them.
|
|
1196
|
+
*/
|
|
1197
|
+
export type TimelinePage = {
|
|
1198
|
+
events: TimelineEvent[];
|
|
1199
|
+
/**
|
|
1200
|
+
* The next page's cursor; absent on the last.
|
|
1201
|
+
*/
|
|
1202
|
+
next_cursor?: string;
|
|
1203
|
+
/**
|
|
1204
|
+
* The person the id asked for is: an anonymous id identified as a user is that user.
|
|
1205
|
+
*/
|
|
1206
|
+
person_id: string;
|
|
1207
|
+
};
|
|
746
1208
|
export type Trace = {
|
|
747
1209
|
/**
|
|
748
1210
|
* Whose.
|
|
@@ -973,8 +1435,94 @@ export type TraceTimeline = {
|
|
|
973
1435
|
*/
|
|
974
1436
|
rows: TraceHour[];
|
|
975
1437
|
};
|
|
1438
|
+
/** The events this module sends the project's webhooks (x-palbase-events), by type: each one's payload, the event's data. */
|
|
1439
|
+
export interface Events {
|
|
1440
|
+
/**
|
|
1441
|
+
* audience.entered: a person came to be in an audience — what they did, or what was set of them, made its rule pick them.
|
|
1442
|
+
*/
|
|
1443
|
+
"audience.entered": AudienceChangedEvent;
|
|
1444
|
+
/**
|
|
1445
|
+
* audience.exited: a person left an audience — its rule no longer picks them (a window passed, a property changed).
|
|
1446
|
+
*/
|
|
1447
|
+
"audience.exited": AudienceChangedEvent;
|
|
1448
|
+
}
|
|
976
1449
|
/** Palbase Analytics */
|
|
977
1450
|
export declare function client(t: Transport): {
|
|
1451
|
+
/**
|
|
1452
|
+
* List audiences
|
|
1453
|
+
*
|
|
1454
|
+
* The project's audiences, by name: each one's rule, how many people are in it, and whether its members are the rule's as it stands (ready) or a rule made or changed is still being worked out (pending).
|
|
1455
|
+
*/
|
|
1456
|
+
listAudiences(input?: {
|
|
1457
|
+
signal?: AbortSignal;
|
|
1458
|
+
}): Promise<Reply<200, AudienceList>>;
|
|
1459
|
+
/**
|
|
1460
|
+
* Create an audience
|
|
1461
|
+
*
|
|
1462
|
+
* Makes an audience: the people its rule picks among those behind the project's events. Its members are worked out at once, then every minute; its first members are not told they entered (the rule came to them), everyone who enters or leaves from then on is (audience.entered, audience.exited). A project keeps 100 audiences at most.
|
|
1463
|
+
*/
|
|
1464
|
+
createAudience(input: {
|
|
1465
|
+
body: AudienceCreate; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1466
|
+
signal?: AbortSignal;
|
|
1467
|
+
}): Promise<Reply<201, Audience>>;
|
|
1468
|
+
/**
|
|
1469
|
+
* Preview an audience's rule
|
|
1470
|
+
*
|
|
1471
|
+
* Who a rule would pick now — how many, and the first twenty — without keeping it.
|
|
1472
|
+
*/
|
|
1473
|
+
previewAudience(input: {
|
|
1474
|
+
body: AudiencePreviewRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1475
|
+
signal?: AbortSignal;
|
|
1476
|
+
}): Promise<Reply<200, AudiencePreview>>;
|
|
1477
|
+
/**
|
|
1478
|
+
* Get an audience
|
|
1479
|
+
*
|
|
1480
|
+
* One audience.
|
|
1481
|
+
*/
|
|
1482
|
+
getAudience(input: {
|
|
1483
|
+
path: {
|
|
1484
|
+
id: string;
|
|
1485
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1486
|
+
signal?: AbortSignal;
|
|
1487
|
+
}): Promise<Reply<200, Audience>>;
|
|
1488
|
+
/**
|
|
1489
|
+
* Delete an audience
|
|
1490
|
+
*
|
|
1491
|
+
* Deletes an audience and its members; no one is told they left.
|
|
1492
|
+
*/
|
|
1493
|
+
deleteAudience(input: {
|
|
1494
|
+
path: {
|
|
1495
|
+
id: string;
|
|
1496
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1497
|
+
signal?: AbortSignal;
|
|
1498
|
+
}): Promise<Reply<204, undefined>>;
|
|
1499
|
+
/**
|
|
1500
|
+
* Change an audience
|
|
1501
|
+
*
|
|
1502
|
+
* Changes what the request names. A changed rule is worked out anew and, like a new one, without telling anyone who it picks at once.
|
|
1503
|
+
*/
|
|
1504
|
+
updateAudience(input: {
|
|
1505
|
+
path: {
|
|
1506
|
+
id: string;
|
|
1507
|
+
};
|
|
1508
|
+
body: AudienceUpdate; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1509
|
+
signal?: AbortSignal;
|
|
1510
|
+
}): Promise<Reply<200, Audience>>;
|
|
1511
|
+
/**
|
|
1512
|
+
* List an audience's members
|
|
1513
|
+
*
|
|
1514
|
+
* A page of the audience's members as of its latest working out, in the order of their id: each one's person id, the user they signed in as when they did, and the installs their events came from.
|
|
1515
|
+
*/
|
|
1516
|
+
listAudienceMembers(input: {
|
|
1517
|
+
path: {
|
|
1518
|
+
id: string;
|
|
1519
|
+
};
|
|
1520
|
+
query?: {
|
|
1521
|
+
limit?: number; /** Where the page starts: a next_cursor this API gave. */
|
|
1522
|
+
cursor?: string;
|
|
1523
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1524
|
+
signal?: AbortSignal;
|
|
1525
|
+
}): Promise<Reply<200, AudienceMemberPage>>;
|
|
978
1526
|
/**
|
|
979
1527
|
* Join two ids
|
|
980
1528
|
*
|
|
@@ -1012,7 +1560,7 @@ export declare function client(t: Transport): {
|
|
|
1012
1560
|
*/
|
|
1013
1561
|
getEventBreakdown(input: {
|
|
1014
1562
|
query: {
|
|
1015
|
-
window_seconds?: number; /** What to split by: platform, app_version, os_version, country, event (the event's name), or property:<key> — a key of the events' properties (letters, digits and _ . $ -, 64 at most). */
|
|
1563
|
+
window_seconds?: number; /** What to split by: platform, app_version, os_version, country, region (a province, a state: its English name), city, event (the event's name), or property:<key> — a key of the events' properties (letters, digits and _ . $ -, 64 at most). */
|
|
1016
1564
|
by: string; /** Only this event (every event unless said). */
|
|
1017
1565
|
event?: string; /** Values per page (10 unless said). */
|
|
1018
1566
|
limit?: number; /** The next_cursor of the page before: reads the page after it. */
|
|
@@ -1410,5 +1958,74 @@ export declare function client(t: Transport): {
|
|
|
1410
1958
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1411
1959
|
signal?: AbortSignal;
|
|
1412
1960
|
}): Promise<Reply<200, TraceTimeline>>;
|
|
1961
|
+
/**
|
|
1962
|
+
* Find people
|
|
1963
|
+
*
|
|
1964
|
+
* Finds people by an id they went by — a user's, an anonymous one, an install's — or by their email ($email, email), most recently seen first.
|
|
1965
|
+
*/
|
|
1966
|
+
searchPeople(input: {
|
|
1967
|
+
query: {
|
|
1968
|
+
query: string;
|
|
1969
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1970
|
+
signal?: AbortSignal;
|
|
1971
|
+
}): Promise<Reply<200, PeopleFound>>;
|
|
1972
|
+
/**
|
|
1973
|
+
* Set a person's properties
|
|
1974
|
+
*
|
|
1975
|
+
* Sets properties of a person: the signed-in user, with no one signed in the app's anonymous id, or — the project's server — whom it names. set replaces, set_once sets what is not set (where they first came from), unset removes, add adds a number. The anonymous id's properties are the user's once it is identified as them.
|
|
1976
|
+
*/
|
|
1977
|
+
setPersonProperties(input: {
|
|
1978
|
+
body: PeopleRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1979
|
+
signal?: AbortSignal;
|
|
1980
|
+
}): Promise<Reply<202, undefined>>;
|
|
1981
|
+
/**
|
|
1982
|
+
* Get a person
|
|
1983
|
+
*
|
|
1984
|
+
* What is known of a person: the ids they went by (an anonymous id identified as a user is that user), the installs their events came from, their properties as they stand, when they were first and last seen, and the context of their newest event.
|
|
1985
|
+
*/
|
|
1986
|
+
getPerson(input: {
|
|
1987
|
+
path: {
|
|
1988
|
+
person_id: string;
|
|
1989
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1990
|
+
signal?: AbortSignal;
|
|
1991
|
+
}): Promise<Reply<200, Person>>;
|
|
1992
|
+
/**
|
|
1993
|
+
* List a person's events
|
|
1994
|
+
*
|
|
1995
|
+
* A page of a person's events, newest first: every event under an id they went by — what their apps sent, what their backend sent, and what the platform's modules did for them (a purchase, a push that reached their phone, a consent changed) — and the platform's events about an install of theirs no one was signed in on.
|
|
1996
|
+
*/
|
|
1997
|
+
listPersonEvents(input: {
|
|
1998
|
+
path: {
|
|
1999
|
+
person_id: string;
|
|
2000
|
+
};
|
|
2001
|
+
query?: {
|
|
2002
|
+
limit?: number; /** The next_cursor of the page before: reads the page after it. */
|
|
2003
|
+
cursor?: string;
|
|
2004
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2005
|
+
signal?: AbortSignal;
|
|
2006
|
+
}): Promise<Reply<200, TimelinePage>>;
|
|
2007
|
+
/**
|
|
2008
|
+
* Get the event catalog
|
|
2009
|
+
*
|
|
2010
|
+
* Every event a project's timelines can hold, with the fields each carries: the platform modules' (their contracts'), and those the project's apps and backend sent in the window (30 days unless said), with how many and the JSON types their properties were — and what the project said of each.
|
|
2011
|
+
*/
|
|
2012
|
+
getEventCatalog(input?: {
|
|
2013
|
+
query?: {
|
|
2014
|
+
window_seconds?: number;
|
|
2015
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2016
|
+
signal?: AbortSignal;
|
|
2017
|
+
}): Promise<Reply<200, Catalog>>;
|
|
2018
|
+
/**
|
|
2019
|
+
* Describe an event
|
|
2020
|
+
*
|
|
2021
|
+
* Says what an event is, and whether the catalog hides it.
|
|
2022
|
+
*/
|
|
2023
|
+
defineEvent(input: {
|
|
2024
|
+
path: {
|
|
2025
|
+
name: string;
|
|
2026
|
+
};
|
|
2027
|
+
body: EventDefinition; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2028
|
+
signal?: AbortSignal;
|
|
2029
|
+
}): Promise<Reply<200, EventDefinition>>;
|
|
1413
2030
|
};
|
|
1414
2031
|
export type Client = ReturnType<typeof client>;
|