@pushwoosh/rpc-v2-http-api-data 0.2.525 → 0.2.526
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/accounts.d.ts +11 -48
- package/app_inbox_presets.d.ts +2 -2
- package/applications_controlgroup.d.ts +0 -22
- package/approvals.d.ts +0 -42
- package/commonTypes.d.ts +16 -4
- package/data.js +49 -575
- package/devices.d.ts +3 -3
- package/fb_messenger_presets.d.ts +2 -2
- package/feature_flags.d.ts +5 -5
- package/line_presets.d.ts +3 -3
- package/media_files.d.ts +0 -23
- package/package.json +1 -1
- package/presets.d.ts +5 -5
- package/pushwoosh_accounts_alerts_v1.d.ts +4 -4
- package/pushwoosh_channels_messagingApi_v2.d.ts +19 -51
- package/sms_provider_templates.d.ts +0 -84
- package/subscription_prompt.d.ts +3 -3
- package/types.js +2 -0
- package/web_sdk_config.d.ts +3 -3
package/accounts.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RpcMethod } from './commonTypes';
|
|
1
|
+
import { RpcMethod, JsonObject } from './commonTypes';
|
|
2
2
|
import { DeliveryTrackingState as pushwoosh_rpc_v2_applications_info_DeliveryTrackingState } from './applications_info';
|
|
3
3
|
import { AiBuilderDocument as pushwoosh_aibuilder_v1_AiBuilderDocument } from './pushwoosh_aibuilder_v1';
|
|
4
4
|
export type AccountsService_GetEmailStatisticCount = RpcMethod<GetEmailStatisticCountRequest, GetEmailStatisticCountResponse>;
|
|
@@ -295,7 +295,7 @@ export type UpdateEmailTemplateRequest = {
|
|
|
295
295
|
content?: EmailContent;
|
|
296
296
|
label?: string;
|
|
297
297
|
categories?: string[];
|
|
298
|
-
previewSettings?:
|
|
298
|
+
previewSettings?: JsonObject;
|
|
299
299
|
/** Drops every category of the template; an empty categories list cannot say this, it reads as "leave them alone". */
|
|
300
300
|
resetCategories?: boolean;
|
|
301
301
|
};
|
|
@@ -310,7 +310,7 @@ export type EmailTemplate = {
|
|
|
310
310
|
created: Date;
|
|
311
311
|
updated: Date;
|
|
312
312
|
categories: string[];
|
|
313
|
-
previewSettings:
|
|
313
|
+
previewSettings: JsonObject;
|
|
314
314
|
/**
|
|
315
315
|
* Number of the newest stored content version; 0 when the item has none. Compare it with
|
|
316
316
|
* the version an approval request was decided on: a lower one means the decision predates
|
|
@@ -323,7 +323,7 @@ export type TestEmailTemplateRequest = {
|
|
|
323
323
|
application?: string;
|
|
324
324
|
code?: string;
|
|
325
325
|
email?: string;
|
|
326
|
-
dynamicContent?:
|
|
326
|
+
dynamicContent?: JsonObject;
|
|
327
327
|
/**
|
|
328
328
|
* Prefixes every subject localization with "[TEST] " so the test send is
|
|
329
329
|
* distinguishable from a real campaign in the recipient's mailbox.
|
|
@@ -337,7 +337,7 @@ export type CreateEmailTemplateRequest = {
|
|
|
337
337
|
content?: EmailContent;
|
|
338
338
|
label?: string;
|
|
339
339
|
categories?: string[];
|
|
340
|
-
previewSettings?:
|
|
340
|
+
previewSettings?: JsonObject;
|
|
341
341
|
/** System templates are feature internals (e.g. synced-block fragments): hidden from List/labels, still reachable by code. */
|
|
342
342
|
system?: boolean;
|
|
343
343
|
};
|
|
@@ -356,15 +356,15 @@ export type EmailContent_Unlayer = {
|
|
|
356
356
|
/** Raw html */
|
|
357
357
|
html: string;
|
|
358
358
|
/** Localization map {"en": {"variable":"value"}...} */
|
|
359
|
-
localizationData:
|
|
359
|
+
localizationData: JsonObject;
|
|
360
360
|
/** Unlayer specific config */
|
|
361
|
-
editorConfig:
|
|
361
|
+
editorConfig: JsonObject;
|
|
362
362
|
};
|
|
363
363
|
export type EmailContent_Pushwoosh = {
|
|
364
364
|
/** Raw html */
|
|
365
365
|
html: string;
|
|
366
366
|
/** Localization map {"en": {"variable":"value"}...} */
|
|
367
|
-
localizationData:
|
|
367
|
+
localizationData: JsonObject;
|
|
368
368
|
};
|
|
369
369
|
export type EmailContent_Raw = {
|
|
370
370
|
/** html map {"en": "html_content"...} */
|
|
@@ -377,13 +377,13 @@ export type EmailContent_Smartcards = {
|
|
|
377
377
|
*/
|
|
378
378
|
html: string;
|
|
379
379
|
/** Deprecated: ignored on write, derived from the document with the html. */
|
|
380
|
-
localizationData:
|
|
380
|
+
localizationData: JsonObject;
|
|
381
381
|
/**
|
|
382
382
|
* The document in the editor dialect (camelCase, tagged oneofs) — what
|
|
383
383
|
* clients wrote before `document` existed. Accepted on write while stored
|
|
384
384
|
* templates still hold it; prefer `document`.
|
|
385
385
|
*/
|
|
386
|
-
content:
|
|
386
|
+
content: JsonObject;
|
|
387
387
|
/**
|
|
388
388
|
* The document, typed. Same shape the renderer takes, so nothing converts
|
|
389
389
|
* it on the way in — set this and leave `content` empty.
|
|
@@ -521,45 +521,8 @@ export type MigrateRequest = {
|
|
|
521
521
|
subject?: Record<string, string>;
|
|
522
522
|
senderInfo?: MigrateRequest_SenderInfo;
|
|
523
523
|
categories?: string[];
|
|
524
|
-
previewSettings?:
|
|
524
|
+
previewSettings?: JsonObject;
|
|
525
525
|
};
|
|
526
526
|
export type MigrateResponse = {
|
|
527
527
|
code: string;
|
|
528
528
|
};
|
|
529
|
-
export type RebakeEmailTemplatesRequest = {
|
|
530
|
-
/** Template codes to process; empty walks every smartcards template on the share. */
|
|
531
|
-
codes: string[];
|
|
532
|
-
/** Report what would change and write nothing. */
|
|
533
|
-
dryRun: boolean;
|
|
534
|
-
/** Templates per call. 0 = 100, capped at 500 — a render is a network call. */
|
|
535
|
-
limit: number;
|
|
536
|
-
/** Resume point: only codes strictly greater than this are considered. */
|
|
537
|
-
afterCode: string;
|
|
538
|
-
};
|
|
539
|
-
export type RebakeEmailTemplatesResponse = {
|
|
540
|
-
scanned: number;
|
|
541
|
-
/** Templates rewritten. A dry run writes nothing and counts into would_change. */
|
|
542
|
-
changed: number;
|
|
543
|
-
failed: number;
|
|
544
|
-
/** Last code considered; pass it as after_code to continue the walk. */
|
|
545
|
-
lastCode: string;
|
|
546
|
-
/** Candidates left after this page. */
|
|
547
|
-
remaining: number;
|
|
548
|
-
/**
|
|
549
|
-
* Only the templates that changed, were skipped or failed; unchanged ones are
|
|
550
|
-
* counted, not listed.
|
|
551
|
-
*/
|
|
552
|
-
results: RebakeEmailTemplateResult[];
|
|
553
|
-
/** Templates a dry run would have rewritten. */
|
|
554
|
-
wouldChange: number;
|
|
555
|
-
/** Templates the sweep cannot rebake and never will — nothing to retry. */
|
|
556
|
-
skipped: number;
|
|
557
|
-
};
|
|
558
|
-
export type RebakeEmailTemplateResult = {
|
|
559
|
-
code: string;
|
|
560
|
-
/** changed | would_change | skipped | failed */
|
|
561
|
-
status: string;
|
|
562
|
-
error: string;
|
|
563
|
-
htmlBytesBefore: number;
|
|
564
|
-
htmlBytesAfter: number;
|
|
565
|
-
};
|
package/app_inbox_presets.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RpcMethod } from './commonTypes';
|
|
1
|
+
import { RpcMethod, JsonObject } from './commonTypes';
|
|
2
2
|
export type appInboxPresetsService_List = RpcMethod<ListAppInboxPresetsRequest, ListAppInboxPresetsResponse>;
|
|
3
3
|
export type appInboxPresetsService_Get = RpcMethod<GetAppInboxPresetRequest, GetAppInboxPresetResponse>;
|
|
4
4
|
export type appInboxPresetsService_Create = RpcMethod<CreateAppInboxPresetRequest, CreateAppInboxPresetResponse>;
|
|
@@ -65,7 +65,7 @@ export type AppInboxPresetLocale = {
|
|
|
65
65
|
bannerUrl: string;
|
|
66
66
|
openAction: AppInboxPresetOpenAction;
|
|
67
67
|
/** Arbitrary key-value payload delivered to the app along with the message. */
|
|
68
|
-
customData:
|
|
68
|
+
customData: JsonObject;
|
|
69
69
|
/** Layout of the inbox message: "classic" (the default when empty), "captioned", "banner" or "carousel". Each layout makes different fields of this message required. */
|
|
70
70
|
layoutType: string;
|
|
71
71
|
/** Slides of the "carousel" layout: 1 to 10 of them, required for it, ignored otherwise. */
|
|
@@ -352,28 +352,6 @@ export type AnalyticsEvent = {
|
|
|
352
352
|
export type GetAnalyticsResponse = {
|
|
353
353
|
events: AnalyticsEvent[];
|
|
354
354
|
};
|
|
355
|
-
export type RolloverControlGroupsRequest = {
|
|
356
|
-
/** Report what would change and write nothing. */
|
|
357
|
-
dryRun: boolean;
|
|
358
|
-
};
|
|
359
|
-
/** RolloverControlGroupResult is one group whose cycle was due. */
|
|
360
|
-
export type RolloverControlGroupResult = {
|
|
361
|
-
controlGroupCode: string;
|
|
362
|
-
applicationId: number;
|
|
363
|
-
/** Rollover for a redrawn auto-refresh group, expired for a switched-off experiment. */
|
|
364
|
-
closeReason: ControlGroupCycleCloseReason;
|
|
365
|
-
/** Set when the change failed; the group is left as it was and retried next run. */
|
|
366
|
-
error: string;
|
|
367
|
-
};
|
|
368
|
-
export type RolloverControlGroupsResponse = {
|
|
369
|
-
/** Enabled auto-refresh and experiment groups looked at. */
|
|
370
|
-
scanned: number;
|
|
371
|
-
refreshed: number;
|
|
372
|
-
expired: number;
|
|
373
|
-
failed: number;
|
|
374
|
-
/** Only the groups that were due. */
|
|
375
|
-
results: RolloverControlGroupResult[];
|
|
376
|
-
};
|
|
377
355
|
export type CheckControlGroupMembershipRequest = {
|
|
378
356
|
/** Application code (format XXXXX-XXXXX) the group belongs to. */
|
|
379
357
|
code?: string;
|
package/approvals.d.ts
CHANGED
|
@@ -115,45 +115,3 @@ export type GetContentVersionRequest = {
|
|
|
115
115
|
export type GetContentVersionResponse = {
|
|
116
116
|
version: ContentVersion;
|
|
117
117
|
};
|
|
118
|
-
export type BackfillContentVersionsRequest = {
|
|
119
|
-
/** Which content to sweep; required. */
|
|
120
|
-
ownerType: ContentOwnerType;
|
|
121
|
-
/** Resume point: only items with a strictly greater id are considered. */
|
|
122
|
-
afterId: number;
|
|
123
|
-
/** Items per call. 0 = 100, capped at 500. */
|
|
124
|
-
limit: number;
|
|
125
|
-
/** Report what would be written and write nothing. */
|
|
126
|
-
dryRun: boolean;
|
|
127
|
-
};
|
|
128
|
-
export type BackfillContentVersionsResponse = {
|
|
129
|
-
scanned: number;
|
|
130
|
-
/** Items that got a grandfathered version. A dry run writes nothing and counts into would_create. */
|
|
131
|
-
created: number;
|
|
132
|
-
/** Items that already held a version. */
|
|
133
|
-
skipped: number;
|
|
134
|
-
failed: number;
|
|
135
|
-
/** Last id considered; pass it as after_id to continue the sweep. */
|
|
136
|
-
lastId: number;
|
|
137
|
-
/** No items left after this page. */
|
|
138
|
-
done: boolean;
|
|
139
|
-
/** Items a dry run would have versioned — those that hold no version at all, not the whole page. */
|
|
140
|
-
wouldCreate: number;
|
|
141
|
-
/** Only the items the sweep could not read or write; the rest are counted, not listed. */
|
|
142
|
-
failures: BackfillContentVersionFailure[];
|
|
143
|
-
/**
|
|
144
|
-
* Items whose stored hash no longer matched the content and was rewritten; in a dry run,
|
|
145
|
-
* the items that would be rewritten.
|
|
146
|
-
*/
|
|
147
|
-
rehashed: number;
|
|
148
|
-
/**
|
|
149
|
-
* Of the created ones, those whose body could not be read: the version carries neither
|
|
150
|
-
* snapshot nor hash, so the item stays sendable and the next save versions it properly.
|
|
151
|
-
*/
|
|
152
|
-
createdBlind: number;
|
|
153
|
-
/** The items behind created_blind, with the reason their content could not be read. */
|
|
154
|
-
unreadable: BackfillContentVersionFailure[];
|
|
155
|
-
};
|
|
156
|
-
export type BackfillContentVersionFailure = {
|
|
157
|
-
ownerCode: string;
|
|
158
|
-
error: string;
|
|
159
|
-
};
|
package/commonTypes.d.ts
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
export type Duration = number;
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/** Arbitrary JSON value (google.protobuf.Value). */
|
|
3
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
4
|
+
[key: string]: JsonValue;
|
|
5
|
+
};
|
|
6
|
+
/** Arbitrary JSON object (google.protobuf.Struct). */
|
|
7
|
+
export type JsonObject = {
|
|
8
|
+
[key: string]: JsonValue;
|
|
9
|
+
};
|
|
10
|
+
/** Per-call options accepted by every method. */
|
|
11
|
+
export type RpcCallOptions = {
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
};
|
|
14
|
+
export type RpcMethod<Req, Res> = ((request: Req, options?: RpcCallOptions) => Promise<Res>) & {
|
|
15
|
+
safe(request: Req, options?: RpcCallOptions): Promise<[{
|
|
4
16
|
error: unknown;
|
|
5
17
|
}, null] | [null, Res]>;
|
|
6
18
|
};
|
|
7
|
-
export type RpcMethodV3<Req, Res, Err> = ((request: Req) => Promise<Res>) & {
|
|
8
|
-
safe(request: Req): Promise<[Err, null] | [null, Res]>;
|
|
19
|
+
export type RpcMethodV3<Req, Res, Err> = ((request: Req, options?: RpcCallOptions) => Promise<Res>) & {
|
|
20
|
+
safe(request: Req, options?: RpcCallOptions): Promise<[Err, null] | [null, Res]>;
|
|
9
21
|
parseError(e: unknown): Err;
|
|
10
22
|
};
|