@pushwoosh/rpc-v2-http-api-data 0.2.280 → 0.2.281

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 CHANGED
@@ -31106,6 +31106,222 @@ export const data = {
31106
31106
  "type": "I",
31107
31107
  "fields": {}
31108
31108
  },
31109
+ "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplatesService": {
31110
+ "type": "S",
31111
+ "key": "smsProviderTemplates",
31112
+ "methods": {}
31113
+ },
31114
+ "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplateStatus": {
31115
+ "type": "E",
31116
+ "values": [
31117
+ "SMS_PROVIDER_TEMPLATE_STATUS_DRAFT",
31118
+ "SMS_PROVIDER_TEMPLATE_STATUS_REVIEW",
31119
+ "SMS_PROVIDER_TEMPLATE_STATUS_PUBLISHED",
31120
+ "SMS_PROVIDER_TEMPLATE_STATUS_DEPRECATED"
31121
+ ]
31122
+ },
31123
+ "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplateSend": {
31124
+ "type": "I",
31125
+ "fields": {
31126
+ "method": {
31127
+ "type": "string"
31128
+ },
31129
+ "url": {
31130
+ "type": "string"
31131
+ },
31132
+ "contentType": {
31133
+ "type": "string"
31134
+ },
31135
+ "headers": {
31136
+ "type": "string",
31137
+ "mapKeyType": "string"
31138
+ },
31139
+ "query": {
31140
+ "type": "string",
31141
+ "mapKeyType": "string"
31142
+ },
31143
+ "bodyTemplate": {
31144
+ "type": "string"
31145
+ }
31146
+ }
31147
+ },
31148
+ "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplateResponse": {
31149
+ "type": "I",
31150
+ "fields": {
31151
+ "messageIdPath": {
31152
+ "type": "string"
31153
+ },
31154
+ "errorPath": {
31155
+ "type": "string"
31156
+ },
31157
+ "successHttpStatus": {
31158
+ "type": "number",
31159
+ "array": true
31160
+ },
31161
+ "successPath": {
31162
+ "type": "string"
31163
+ },
31164
+ "successEquals": {
31165
+ "type": "string",
31166
+ "array": true
31167
+ }
31168
+ }
31169
+ },
31170
+ "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplateDlr": {
31171
+ "type": "I",
31172
+ "fields": {
31173
+ "format": {
31174
+ "type": "string"
31175
+ },
31176
+ "correlation": {
31177
+ "type": "string"
31178
+ },
31179
+ "messageIdPath": {
31180
+ "type": "string"
31181
+ },
31182
+ "statusPath": {
31183
+ "type": "string"
31184
+ },
31185
+ "statusMap": {
31186
+ "type": "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplateStatusCodes",
31187
+ "mapKeyType": "string"
31188
+ }
31189
+ }
31190
+ },
31191
+ "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplateStatusCodes": {
31192
+ "type": "I",
31193
+ "fields": {
31194
+ "codes": {
31195
+ "type": "string",
31196
+ "array": true
31197
+ }
31198
+ }
31199
+ },
31200
+ "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplate": {
31201
+ "type": "I",
31202
+ "fields": {
31203
+ "slug": {
31204
+ "type": "string"
31205
+ },
31206
+ "version": {
31207
+ "type": "string"
31208
+ },
31209
+ "title": {
31210
+ "type": "string"
31211
+ },
31212
+ "description": {
31213
+ "type": "string"
31214
+ },
31215
+ "icon": {
31216
+ "type": "string"
31217
+ },
31218
+ "status": {
31219
+ "type": "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplateStatus"
31220
+ },
31221
+ "configSchema": {
31222
+ "type": "string"
31223
+ },
31224
+ "send": {
31225
+ "type": "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplateSend"
31226
+ },
31227
+ "response": {
31228
+ "type": "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplateResponse"
31229
+ },
31230
+ "dlr": {
31231
+ "type": "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplateDlr"
31232
+ },
31233
+ "allowedHosts": {
31234
+ "type": "string",
31235
+ "array": true
31236
+ },
31237
+ "created": {
31238
+ "type": "Date"
31239
+ },
31240
+ "updated": {
31241
+ "type": "Date"
31242
+ },
31243
+ "publishedAt": {
31244
+ "type": "Date"
31245
+ }
31246
+ }
31247
+ },
31248
+ "pushwoosh.rpc_v2.sms_provider_templates.SaveSmsProviderTemplateRequest": {
31249
+ "type": "I",
31250
+ "fields": {
31251
+ "template": {
31252
+ "type": "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplate"
31253
+ },
31254
+ "dryRun": {
31255
+ "type": "boolean"
31256
+ }
31257
+ }
31258
+ },
31259
+ "pushwoosh.rpc_v2.sms_provider_templates.SaveSmsProviderTemplateResponse": {
31260
+ "type": "I",
31261
+ "fields": {
31262
+ "template": {
31263
+ "type": "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplate"
31264
+ }
31265
+ }
31266
+ },
31267
+ "pushwoosh.rpc_v2.sms_provider_templates.ListSmsProviderTemplatesRequest": {
31268
+ "type": "I",
31269
+ "fields": {
31270
+ "slug": {
31271
+ "type": "string"
31272
+ }
31273
+ }
31274
+ },
31275
+ "pushwoosh.rpc_v2.sms_provider_templates.ListSmsProviderTemplatesResponse": {
31276
+ "type": "I",
31277
+ "fields": {
31278
+ "templates": {
31279
+ "type": "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplate",
31280
+ "array": true
31281
+ }
31282
+ }
31283
+ },
31284
+ "pushwoosh.rpc_v2.sms_provider_templates.GetSmsProviderTemplateRequest": {
31285
+ "type": "I",
31286
+ "fields": {
31287
+ "slug": {
31288
+ "type": "string"
31289
+ },
31290
+ "version": {
31291
+ "type": "string"
31292
+ }
31293
+ }
31294
+ },
31295
+ "pushwoosh.rpc_v2.sms_provider_templates.GetSmsProviderTemplateResponse": {
31296
+ "type": "I",
31297
+ "fields": {
31298
+ "template": {
31299
+ "type": "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplate"
31300
+ }
31301
+ }
31302
+ },
31303
+ "pushwoosh.rpc_v2.sms_provider_templates.SetSmsProviderTemplateStatusRequest": {
31304
+ "type": "I",
31305
+ "fields": {
31306
+ "slug": {
31307
+ "type": "string"
31308
+ },
31309
+ "version": {
31310
+ "type": "string"
31311
+ },
31312
+ "status": {
31313
+ "type": "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplateStatus"
31314
+ }
31315
+ }
31316
+ },
31317
+ "pushwoosh.rpc_v2.sms_provider_templates.SetSmsProviderTemplateStatusResponse": {
31318
+ "type": "I",
31319
+ "fields": {
31320
+ "template": {
31321
+ "type": "pushwoosh.rpc_v2.sms_provider_templates.SmsProviderTemplate"
31322
+ }
31323
+ }
31324
+ },
31109
31325
  "pushwoosh.rpc_v2.statistics_dashboards.StatisticsDashboardsService": {
31110
31326
  "type": "S",
31111
31327
  "key": "statisticsDashboards",
package/index.d.ts CHANGED
@@ -60,6 +60,7 @@ import { SegmentStatisticsService as pushwoosh_rpc_v2_segment_statistics_Segment
60
60
  import { SegmentsService as pushwoosh_rpc_segments_v3_SegmentsService } from './pushwoosh_rpc_segments_v3';
61
61
  import { SendRateService as pushwoosh_rpc_v2_send_rate_SendRateService } from './send_rate';
62
62
  import { smsPresetsService as pushwoosh_rpc_v2_sms_presets_smsPresetsService } from './sms_presets';
63
+ import { SmsProviderTemplatesService as pushwoosh_rpc_v2_sms_provider_templates_SmsProviderTemplatesService } from './sms_provider_templates';
63
64
  import { StatisticsDashboardsService as pushwoosh_rpc_v2_statistics_dashboards_StatisticsDashboardsService } from './statistics_dashboards';
64
65
  import { StatisticsDashboardsWidgetsService as pushwoosh_rpc_v2_statistics_dashboards_widgets_StatisticsDashboardsWidgetsService } from './statistics_dashboards_widgets';
65
66
  import { SubscriptionPromptService as pushwoosh_rpc_v2_subscription_prompt_SubscriptionPromptService } from './subscription_prompt';
@@ -133,6 +134,7 @@ export type API = {
133
134
  segments: pushwoosh_rpc_segments_v3_SegmentsService;
134
135
  sendRate: pushwoosh_rpc_v2_send_rate_SendRateService;
135
136
  smsPresets: pushwoosh_rpc_v2_sms_presets_smsPresetsService;
137
+ smsProviderTemplates: pushwoosh_rpc_v2_sms_provider_templates_SmsProviderTemplatesService;
136
138
  statisticsDashboards: pushwoosh_rpc_v2_statistics_dashboards_StatisticsDashboardsService;
137
139
  statisticsDashboardsWidgets: pushwoosh_rpc_v2_statistics_dashboards_widgets_StatisticsDashboardsWidgetsService;
138
140
  subscriptionPrompt: pushwoosh_rpc_v2_subscription_prompt_SubscriptionPromptService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.280",
3
+ "version": "0.2.281",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -0,0 +1,90 @@
1
+ /**
2
+ * SmsProviderTemplatesService owns the catalog of SMS gateways described declaratively. Publishing
3
+ * a template is how a new provider reaches every DC without a release of the sending services.
4
+ */
5
+ export interface SmsProviderTemplatesService {
6
+ }
7
+ /** SmsProviderTemplateStatus is the publication state of one version. */
8
+ export type SmsProviderTemplateStatus = 'SMS_PROVIDER_TEMPLATE_STATUS_DRAFT' | 'SMS_PROVIDER_TEMPLATE_STATUS_REVIEW' | 'SMS_PROVIDER_TEMPLATE_STATUS_PUBLISHED' | 'SMS_PROVIDER_TEMPLATE_STATUS_DEPRECATED';
9
+ /**
10
+ * SmsProviderTemplateSend is the HTTP call the gateway expects. Values come from {{config:<field>}}
11
+ * of config_schema and from the per-message macros {{phone}}, {{text}}, {{sender}}, {{message_id}}.
12
+ */
13
+ export type SmsProviderTemplateSend = {
14
+ method: string;
15
+ url: string;
16
+ contentType: string;
17
+ headers: Record<string, string>;
18
+ query: Record<string, string>;
19
+ bodyTemplate: string;
20
+ };
21
+ /**
22
+ * SmsProviderTemplateResponse maps the send reply: where the provider message id is, where its
23
+ * error wording is, and what counts as an accepted send.
24
+ */
25
+ export type SmsProviderTemplateResponse = {
26
+ messageIdPath: string;
27
+ errorPath: string;
28
+ successHttpStatus: number[];
29
+ successPath: string;
30
+ successEquals: string[];
31
+ };
32
+ /**
33
+ * SmsProviderTemplateDlr describes the delivery report: its transport, where the id and the status
34
+ * live, whose id the gateway echoes, and which gateway statuses mean what.
35
+ */
36
+ export type SmsProviderTemplateDlr = {
37
+ format: string;
38
+ correlation: string;
39
+ messageIdPath: string;
40
+ statusPath: string;
41
+ statusMap: Record<string, SmsProviderTemplateStatusCodes>;
42
+ };
43
+ export type SmsProviderTemplateStatusCodes = {
44
+ codes: string[];
45
+ };
46
+ export type SmsProviderTemplate = {
47
+ slug: string;
48
+ version: string;
49
+ title: string;
50
+ description: string;
51
+ icon: string;
52
+ status: SmsProviderTemplateStatus;
53
+ configSchema: string;
54
+ send: SmsProviderTemplateSend;
55
+ response: SmsProviderTemplateResponse;
56
+ dlr: SmsProviderTemplateDlr;
57
+ allowedHosts: string[];
58
+ created: Date;
59
+ updated: Date;
60
+ publishedAt: Date;
61
+ };
62
+ export type SaveSmsProviderTemplateRequest = {
63
+ template: SmsProviderTemplate;
64
+ /** dry_run reports what the linter found without writing anything. */
65
+ dryRun: boolean;
66
+ };
67
+ export type SaveSmsProviderTemplateResponse = {
68
+ template: SmsProviderTemplate;
69
+ };
70
+ export type ListSmsProviderTemplatesRequest = {
71
+ slug: string;
72
+ };
73
+ export type ListSmsProviderTemplatesResponse = {
74
+ templates: SmsProviderTemplate[];
75
+ };
76
+ export type GetSmsProviderTemplateRequest = {
77
+ slug: string;
78
+ version: string;
79
+ };
80
+ export type GetSmsProviderTemplateResponse = {
81
+ template: SmsProviderTemplate;
82
+ };
83
+ export type SetSmsProviderTemplateStatusRequest = {
84
+ slug: string;
85
+ version: string;
86
+ status: SmsProviderTemplateStatus;
87
+ };
88
+ export type SetSmsProviderTemplateStatusResponse = {
89
+ template: SmsProviderTemplate;
90
+ };
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ /* Autogenerated code */
3
+ export {};