@pushwoosh/rpc-v2-http-api-data 0.2.518 → 0.2.519
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/data.js +130 -0
- package/index.d.ts +2 -0
- package/package.json +1 -1
- package/silent_hours.d.ts +66 -0
- package/silent_hours.js +3 -0
package/data.js
CHANGED
|
@@ -38167,6 +38167,136 @@ export const data = {
|
|
|
38167
38167
|
"type": "I",
|
|
38168
38168
|
"fields": {}
|
|
38169
38169
|
},
|
|
38170
|
+
"pushwoosh.rpc_v2.silent_hours.SilentHoursService": {
|
|
38171
|
+
"type": "S",
|
|
38172
|
+
"key": "silentHours",
|
|
38173
|
+
"methods": {
|
|
38174
|
+
"Get": {
|
|
38175
|
+
"request": "pushwoosh.rpc_v2.silent_hours.GetSilentHoursRequest",
|
|
38176
|
+
"response": "pushwoosh.rpc_v2.silent_hours.SilentHours",
|
|
38177
|
+
"method": "get",
|
|
38178
|
+
"path": "/api/silent_hours/{application}"
|
|
38179
|
+
},
|
|
38180
|
+
"Update": {
|
|
38181
|
+
"request": "pushwoosh.rpc_v2.silent_hours.UpdateSilentHoursRequest",
|
|
38182
|
+
"response": "pushwoosh.rpc_v2.silent_hours.UpdateSilentHoursResponse",
|
|
38183
|
+
"method": "put",
|
|
38184
|
+
"path": "/api/silent_hours/{application}"
|
|
38185
|
+
}
|
|
38186
|
+
}
|
|
38187
|
+
},
|
|
38188
|
+
"pushwoosh.rpc_v2.silent_hours.SilentHoursTimeOfDay": {
|
|
38189
|
+
"type": "I",
|
|
38190
|
+
"fields": {
|
|
38191
|
+
"hour": {
|
|
38192
|
+
"type": "number"
|
|
38193
|
+
},
|
|
38194
|
+
"minute": {
|
|
38195
|
+
"type": "number"
|
|
38196
|
+
}
|
|
38197
|
+
}
|
|
38198
|
+
},
|
|
38199
|
+
"pushwoosh.rpc_v2.silent_hours.ChannelSilentHours": {
|
|
38200
|
+
"type": "I",
|
|
38201
|
+
"fields": {
|
|
38202
|
+
"enabled": {
|
|
38203
|
+
"type": "boolean"
|
|
38204
|
+
},
|
|
38205
|
+
"from": {
|
|
38206
|
+
"type": "pushwoosh.rpc_v2.silent_hours.SilentHoursTimeOfDay"
|
|
38207
|
+
},
|
|
38208
|
+
"to": {
|
|
38209
|
+
"type": "pushwoosh.rpc_v2.silent_hours.SilentHoursTimeOfDay"
|
|
38210
|
+
},
|
|
38211
|
+
"silentDays": {
|
|
38212
|
+
"type": "boolean",
|
|
38213
|
+
"array": true
|
|
38214
|
+
},
|
|
38215
|
+
"behavior": {
|
|
38216
|
+
"type": "string"
|
|
38217
|
+
}
|
|
38218
|
+
}
|
|
38219
|
+
},
|
|
38220
|
+
"pushwoosh.rpc_v2.silent_hours.SilentHours": {
|
|
38221
|
+
"type": "I",
|
|
38222
|
+
"fields": {
|
|
38223
|
+
"timezone": {
|
|
38224
|
+
"type": "string"
|
|
38225
|
+
},
|
|
38226
|
+
"push": {
|
|
38227
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38228
|
+
},
|
|
38229
|
+
"inApp": {
|
|
38230
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38231
|
+
},
|
|
38232
|
+
"email": {
|
|
38233
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38234
|
+
},
|
|
38235
|
+
"sms": {
|
|
38236
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38237
|
+
},
|
|
38238
|
+
"whatsApp": {
|
|
38239
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38240
|
+
},
|
|
38241
|
+
"line": {
|
|
38242
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38243
|
+
},
|
|
38244
|
+
"kakao": {
|
|
38245
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38246
|
+
},
|
|
38247
|
+
"telegram": {
|
|
38248
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38249
|
+
}
|
|
38250
|
+
}
|
|
38251
|
+
},
|
|
38252
|
+
"pushwoosh.rpc_v2.silent_hours.GetSilentHoursRequest": {
|
|
38253
|
+
"type": "I",
|
|
38254
|
+
"fields": {
|
|
38255
|
+
"application": {
|
|
38256
|
+
"type": "string"
|
|
38257
|
+
}
|
|
38258
|
+
}
|
|
38259
|
+
},
|
|
38260
|
+
"pushwoosh.rpc_v2.silent_hours.UpdateSilentHoursRequest": {
|
|
38261
|
+
"type": "I",
|
|
38262
|
+
"fields": {
|
|
38263
|
+
"application": {
|
|
38264
|
+
"type": "string"
|
|
38265
|
+
},
|
|
38266
|
+
"timezone": {
|
|
38267
|
+
"type": "string",
|
|
38268
|
+
"optional": true
|
|
38269
|
+
},
|
|
38270
|
+
"push": {
|
|
38271
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38272
|
+
},
|
|
38273
|
+
"inApp": {
|
|
38274
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38275
|
+
},
|
|
38276
|
+
"email": {
|
|
38277
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38278
|
+
},
|
|
38279
|
+
"sms": {
|
|
38280
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38281
|
+
},
|
|
38282
|
+
"whatsApp": {
|
|
38283
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38284
|
+
},
|
|
38285
|
+
"line": {
|
|
38286
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38287
|
+
},
|
|
38288
|
+
"kakao": {
|
|
38289
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38290
|
+
},
|
|
38291
|
+
"telegram": {
|
|
38292
|
+
"type": "pushwoosh.rpc_v2.silent_hours.ChannelSilentHours"
|
|
38293
|
+
}
|
|
38294
|
+
}
|
|
38295
|
+
},
|
|
38296
|
+
"pushwoosh.rpc_v2.silent_hours.UpdateSilentHoursResponse": {
|
|
38297
|
+
"type": "I",
|
|
38298
|
+
"fields": {}
|
|
38299
|
+
},
|
|
38170
38300
|
"pushwoosh.rpc_v2.sms_presets.smsPresetsService": {
|
|
38171
38301
|
"type": "S",
|
|
38172
38302
|
"key": "smsPresets",
|
package/index.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ import { SdkIntegratorService as pushwoosh_rpc_v2_sdk_integrator_SdkIntegratorSe
|
|
|
69
69
|
import { SegmentStatisticsService as pushwoosh_rpc_v2_segment_statistics_SegmentStatisticsService } from './segment_statistics';
|
|
70
70
|
import { SegmentsService as pushwoosh_rpc_segments_v3_SegmentsService } from './pushwoosh_rpc_segments_v3';
|
|
71
71
|
import { SendRateService as pushwoosh_rpc_v2_send_rate_SendRateService } from './send_rate';
|
|
72
|
+
import { SilentHoursService as pushwoosh_rpc_v2_silent_hours_SilentHoursService } from './silent_hours';
|
|
72
73
|
import { smsPresetsService as pushwoosh_rpc_v2_sms_presets_smsPresetsService } from './sms_presets';
|
|
73
74
|
import { SmsProviderTemplatesService as pushwoosh_rpc_v2_sms_provider_templates_SmsProviderTemplatesService } from './sms_provider_templates';
|
|
74
75
|
import { StatisticsDashboardsService as pushwoosh_rpc_v2_statistics_dashboards_StatisticsDashboardsService } from './statistics_dashboards';
|
|
@@ -154,6 +155,7 @@ export type API = {
|
|
|
154
155
|
segmentStatistics: pushwoosh_rpc_v2_segment_statistics_SegmentStatisticsService;
|
|
155
156
|
segments: pushwoosh_rpc_segments_v3_SegmentsService;
|
|
156
157
|
sendRate: pushwoosh_rpc_v2_send_rate_SendRateService;
|
|
158
|
+
silentHours: pushwoosh_rpc_v2_silent_hours_SilentHoursService;
|
|
157
159
|
smsPresets: pushwoosh_rpc_v2_sms_presets_smsPresetsService;
|
|
158
160
|
smsProviderTemplates: pushwoosh_rpc_v2_sms_provider_templates_SmsProviderTemplatesService;
|
|
159
161
|
statisticsDashboards: pushwoosh_rpc_v2_statistics_dashboards_StatisticsDashboardsService;
|
package/package.json
CHANGED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { RpcMethod } from './commonTypes';
|
|
2
|
+
export type SilentHoursService_Get = RpcMethod<GetSilentHoursRequest, SilentHours>;
|
|
3
|
+
export type SilentHoursService_Update = RpcMethod<UpdateSilentHoursRequest, UpdateSilentHoursResponse>;
|
|
4
|
+
export interface SilentHoursService {
|
|
5
|
+
/** Returns the application-level silent hours of an application code XXXXX-XXXXX, per channel (push, in-app, email, SMS, WhatsApp, LINE, Kakao, Telegram). Silent hours hold or drop marketing messages sent outside journeys during the configured window in the recipient's timezone. An application without settings returns every channel disabled. */
|
|
6
|
+
Get: SilentHoursService_Get;
|
|
7
|
+
/** Sets the application-level silent hours of an application code XXXXX-XXXXX, creating the settings if none exist. Only the channels present in the request are overwritten; the timezone is overwritten when supplied. */
|
|
8
|
+
Update: SilentHoursService_Update;
|
|
9
|
+
}
|
|
10
|
+
export type SilentHoursTimeOfDay = {
|
|
11
|
+
/** Hour of the day, 0-23. */
|
|
12
|
+
hour: number;
|
|
13
|
+
/** Minute of the hour, 0-59. */
|
|
14
|
+
minute: number;
|
|
15
|
+
};
|
|
16
|
+
export type ChannelSilentHours = {
|
|
17
|
+
/** Whether silent hours apply to the channel. */
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
/** Start of the silent window in the recipient's local time. */
|
|
20
|
+
from: SilentHoursTimeOfDay;
|
|
21
|
+
/** End of the silent window in the recipient's local time; a window with from later than to spans midnight. */
|
|
22
|
+
to: SilentHoursTimeOfDay;
|
|
23
|
+
/** Seven flags indexed Sunday=0 ... Saturday=6; a set day is silent for the whole day. Empty means no whole silent days. */
|
|
24
|
+
silentDays: boolean[];
|
|
25
|
+
/** What happens to a message that falls into the window: "" (wait and send when the window ends, default) or "drop". */
|
|
26
|
+
behavior: string;
|
|
27
|
+
};
|
|
28
|
+
export type SilentHours = {
|
|
29
|
+
/** IANA timezone for recipients without an SDK device timezone (email, SMS and messenger-only users); empty means UTC. */
|
|
30
|
+
timezone: string;
|
|
31
|
+
push: ChannelSilentHours;
|
|
32
|
+
inApp: ChannelSilentHours;
|
|
33
|
+
email: ChannelSilentHours;
|
|
34
|
+
sms: ChannelSilentHours;
|
|
35
|
+
whatsApp: ChannelSilentHours;
|
|
36
|
+
line: ChannelSilentHours;
|
|
37
|
+
kakao: ChannelSilentHours;
|
|
38
|
+
telegram: ChannelSilentHours;
|
|
39
|
+
};
|
|
40
|
+
export type GetSilentHoursRequest = {
|
|
41
|
+
/** Application code XXXXX-XXXXX whose silent hours are read. */
|
|
42
|
+
application?: string;
|
|
43
|
+
};
|
|
44
|
+
export type UpdateSilentHoursRequest = {
|
|
45
|
+
/** Application code XXXXX-XXXXX whose silent hours are set. */
|
|
46
|
+
application?: string;
|
|
47
|
+
/** IANA timezone for recipients without an SDK device timezone; omit to leave it unchanged. */
|
|
48
|
+
timezone?: string;
|
|
49
|
+
/** Push channel; omit to leave it unchanged. */
|
|
50
|
+
push?: ChannelSilentHours;
|
|
51
|
+
/** In-app channel; omit to leave it unchanged. */
|
|
52
|
+
inApp?: ChannelSilentHours;
|
|
53
|
+
/** Email channel; omit to leave it unchanged. */
|
|
54
|
+
email?: ChannelSilentHours;
|
|
55
|
+
/** SMS channel; omit to leave it unchanged. */
|
|
56
|
+
sms?: ChannelSilentHours;
|
|
57
|
+
/** WhatsApp channel; omit to leave it unchanged. */
|
|
58
|
+
whatsApp?: ChannelSilentHours;
|
|
59
|
+
/** LINE channel; omit to leave it unchanged. */
|
|
60
|
+
line?: ChannelSilentHours;
|
|
61
|
+
/** Kakao channel; omit to leave it unchanged. */
|
|
62
|
+
kakao?: ChannelSilentHours;
|
|
63
|
+
/** Telegram channel; omit to leave it unchanged. */
|
|
64
|
+
telegram?: ChannelSilentHours;
|
|
65
|
+
};
|
|
66
|
+
export type UpdateSilentHoursResponse = {};
|
package/silent_hours.js
ADDED