@pushwoosh/rpc-gateway-apple-passkit 0.1.51 → 0.1.53

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
@@ -58,6 +58,18 @@ export const data = {
58
58
  "response": "pushwoosh.googlewallet.v1.DeletePassResponse",
59
59
  "method": "delete",
60
60
  "path": "/api/google/pass/{application_code}/{serial_number}"
61
+ },
62
+ "ListTemplates": {
63
+ "request": "pushwoosh.googlewallet.v1.ListTemplatesRequest",
64
+ "response": "pushwoosh.googlewallet.v1.ListTemplatesResponse",
65
+ "method": "get",
66
+ "path": "/api/google/templates"
67
+ },
68
+ "GetTemplate": {
69
+ "request": "pushwoosh.googlewallet.v1.GetTemplateRequest",
70
+ "response": "pushwoosh.googlewallet.v1.GetTemplateResponse",
71
+ "method": "get",
72
+ "path": "/api/google/templates/{filename}"
61
73
  }
62
74
  }
63
75
  },
@@ -100,33 +112,105 @@ export const data = {
100
112
  }
101
113
  }
102
114
  },
103
- "pushwoosh.googlewallet.v1.GoogleBarcode": {
115
+ "pushwoosh.googlewallet.v1.GoogleGeneric": {
104
116
  "type": "I",
105
117
  "fields": {
106
- "format": {
118
+ "cardTitle": {
107
119
  "type": "string"
108
120
  },
109
- "value": {
121
+ "header": {
110
122
  "type": "string"
111
123
  },
112
- "altText": {
124
+ "subheader": {
113
125
  "type": "string"
126
+ },
127
+ "cardFields": {
128
+ "type": "pushwoosh.googlewallet.v1.GoogleTextModule",
129
+ "array": true
114
130
  }
115
131
  }
116
132
  },
117
- "pushwoosh.googlewallet.v1.GooglePass": {
133
+ "pushwoosh.googlewallet.v1.GoogleOffer": {
118
134
  "type": "I",
119
135
  "fields": {
120
- "serialNumber": {
136
+ "title": {
121
137
  "type": "string"
122
138
  },
123
- "cardTitle": {
139
+ "provider": {
124
140
  "type": "string"
125
141
  },
126
- "header": {
142
+ "details": {
127
143
  "type": "string"
128
144
  },
129
- "subheader": {
145
+ "finePrint": {
146
+ "type": "string"
147
+ },
148
+ "redemptionChannel": {
149
+ "type": "string"
150
+ },
151
+ "issuerName": {
152
+ "type": "string"
153
+ }
154
+ }
155
+ },
156
+ "pushwoosh.googlewallet.v1.GoogleLoyalty": {
157
+ "type": "I",
158
+ "fields": {
159
+ "programName": {
160
+ "type": "string"
161
+ },
162
+ "accountName": {
163
+ "type": "string"
164
+ },
165
+ "accountId": {
166
+ "type": "string"
167
+ },
168
+ "pointsLabel": {
169
+ "type": "string"
170
+ },
171
+ "pointsBalance": {
172
+ "type": "string"
173
+ },
174
+ "rewardsTier": {
175
+ "type": "string"
176
+ },
177
+ "rewardsTierLabel": {
178
+ "type": "string"
179
+ },
180
+ "issuerName": {
181
+ "type": "string"
182
+ }
183
+ }
184
+ },
185
+ "pushwoosh.googlewallet.v1.GoogleLocation": {
186
+ "type": "I",
187
+ "fields": {
188
+ "latitude": {
189
+ "type": "number"
190
+ },
191
+ "longitude": {
192
+ "type": "number"
193
+ }
194
+ }
195
+ },
196
+ "pushwoosh.googlewallet.v1.GoogleBarcode": {
197
+ "type": "I",
198
+ "fields": {
199
+ "format": {
200
+ "type": "string"
201
+ },
202
+ "value": {
203
+ "type": "string"
204
+ },
205
+ "altText": {
206
+ "type": "string"
207
+ }
208
+ }
209
+ },
210
+ "pushwoosh.googlewallet.v1.GooglePass": {
211
+ "type": "I",
212
+ "fields": {
213
+ "serialNumber": {
130
214
  "type": "string"
131
215
  },
132
216
  "hexBackgroundColor": {
@@ -149,15 +233,33 @@ export const data = {
149
233
  "type": "pushwoosh.googlewallet.v1.GoogleLinkModule",
150
234
  "array": true
151
235
  },
152
- "cardFields": {
153
- "type": "pushwoosh.googlewallet.v1.GoogleTextModule",
154
- "array": true
155
- },
156
236
  "expirationTime": {
157
237
  "type": "string"
158
238
  },
159
239
  "appLink": {
160
240
  "type": "pushwoosh.googlewallet.v1.GoogleAppLink"
241
+ },
242
+ "locations": {
243
+ "type": "pushwoosh.googlewallet.v1.GoogleLocation",
244
+ "array": true
245
+ },
246
+ "generic": {
247
+ "type": "pushwoosh.googlewallet.v1.GoogleGeneric"
248
+ },
249
+ "offer": {
250
+ "type": "pushwoosh.googlewallet.v1.GoogleOffer"
251
+ },
252
+ "loyalty": {
253
+ "type": "pushwoosh.googlewallet.v1.GoogleLoyalty"
254
+ }
255
+ },
256
+ "oneofs": {
257
+ "style": {
258
+ "oneof": [
259
+ "generic",
260
+ "offer",
261
+ "loyalty"
262
+ ]
161
263
  }
162
264
  }
163
265
  },
@@ -330,6 +432,9 @@ export const data = {
330
432
  },
331
433
  "state": {
332
434
  "type": "string"
435
+ },
436
+ "style": {
437
+ "type": "string"
333
438
  }
334
439
  }
335
440
  },
@@ -418,6 +523,52 @@ export const data = {
418
523
  }
419
524
  }
420
525
  },
526
+ "pushwoosh.googlewallet.v1.GoogleTemplateInfo": {
527
+ "type": "I",
528
+ "fields": {
529
+ "filename": {
530
+ "type": "string"
531
+ },
532
+ "name": {
533
+ "type": "string"
534
+ },
535
+ "description": {
536
+ "type": "string"
537
+ },
538
+ "style": {
539
+ "type": "string"
540
+ }
541
+ }
542
+ },
543
+ "pushwoosh.googlewallet.v1.ListTemplatesRequest": {
544
+ "type": "I",
545
+ "fields": {}
546
+ },
547
+ "pushwoosh.googlewallet.v1.ListTemplatesResponse": {
548
+ "type": "I",
549
+ "fields": {
550
+ "templates": {
551
+ "type": "pushwoosh.googlewallet.v1.GoogleTemplateInfo",
552
+ "array": true
553
+ }
554
+ }
555
+ },
556
+ "pushwoosh.googlewallet.v1.GetTemplateRequest": {
557
+ "type": "I",
558
+ "fields": {
559
+ "filename": {
560
+ "type": "string"
561
+ }
562
+ }
563
+ },
564
+ "pushwoosh.googlewallet.v1.GetTemplateResponse": {
565
+ "type": "I",
566
+ "fields": {
567
+ "template": {
568
+ "type": "pushwoosh.googlewallet.v1.GooglePass"
569
+ }
570
+ }
571
+ },
421
572
  "pushwoosh.passkit.v1.PassKitService": {
422
573
  "type": "S",
423
574
  "key": "passKit",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-apple-passkit",
3
- "version": "0.1.51",
3
+ "version": "0.1.53",
4
4
  "description": "Apple PassKit Service api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -8,6 +8,8 @@ export type GoogleWalletService_GetPass = RpcMethod<GetPassRequest, GetPassRespo
8
8
  export type GoogleWalletService_ListPasses = RpcMethod<ListPassesRequest, ListPassesResponse>;
9
9
  export type GoogleWalletService_SetPassState = RpcMethod<SetPassStateRequest, SetPassStateResponse>;
10
10
  export type GoogleWalletService_DeletePass = RpcMethod<DeletePassRequest, DeletePassResponse>;
11
+ export type GoogleWalletService_ListTemplates = RpcMethod<ListTemplatesRequest, ListTemplatesResponse>;
12
+ export type GoogleWalletService_GetTemplate = RpcMethod<GetTemplateRequest, GetTemplateResponse>;
11
13
  /**
12
14
  * Google Wallet Service - issues Generic passes via the Google Wallet API.
13
15
  *
@@ -47,6 +49,10 @@ export interface GoogleWalletService {
47
49
  * user's device) and drop our stored record.
48
50
  */
49
51
  DeletePass: GoogleWalletService_DeletePass;
52
+ /** List example pass templates. */
53
+ ListTemplates: GoogleWalletService_ListTemplates;
54
+ /** Get an example pass template by filename. */
55
+ GetTemplate: GoogleWalletService_GetTemplate;
50
56
  }
51
57
  /** Text module - a labeled block of text on the pass details view */
52
58
  export type GoogleTextModule = {
@@ -77,6 +83,75 @@ export type GoogleAppLink = {
77
83
  */
78
84
  description: string;
79
85
  };
86
+ /**
87
+ * Generic pass data (maps to GenericClass/GenericObject;
88
+ * https://developers.google.com/wallet/generic). The free-form style: the
89
+ * card layout is composed from these fields via the class card template.
90
+ */
91
+ export type GoogleGeneric = {
92
+ /** required; the issuer/program name at the top */
93
+ cardTitle: string;
94
+ /** required; the main title of the card */
95
+ header: string;
96
+ subheader: string;
97
+ /**
98
+ * Fields pinned to the front of the card via the class
99
+ * cardTemplateOverride: up to 6, rendered as up to 3 rows of 2.
100
+ */
101
+ cardFields: GoogleTextModule[];
102
+ };
103
+ /**
104
+ * Offer pass data (maps to OfferClass/OfferObject;
105
+ * https://developers.google.com/wallet/retail/offers). Google renders its
106
+ * native offer layout: title and provider on the card, details and fine print
107
+ * in the details view.
108
+ */
109
+ export type GoogleOffer = {
110
+ /** required; e.g. "20% off everything" */
111
+ title: string;
112
+ /** required; the merchant name */
113
+ provider: string;
114
+ details: string;
115
+ finePrint: string;
116
+ /** ONLINE | INSTORE | BOTH | TEMPORARY_PRICE_REDUCTION; empty defaults to BOTH. */
117
+ redemptionChannel: string;
118
+ /** Shown on Google's "issued by" surfaces; defaults to provider when empty. */
119
+ issuerName: string;
120
+ };
121
+ /**
122
+ * Loyalty pass data (maps to LoyaltyClass/LoyaltyObject;
123
+ * https://developers.google.com/wallet/retail/loyalty-cards). Google renders
124
+ * its native loyalty layout: program name, member fields, points and tier.
125
+ * Note: Google requires a program logo, so logo_url is mandatory for loyalty.
126
+ */
127
+ export type GoogleLoyalty = {
128
+ /** required */
129
+ programName: string;
130
+ /** member name shown on the card */
131
+ accountName: string;
132
+ /** member id shown on the card */
133
+ accountId: string;
134
+ /** e.g. "Points"; shown only with a balance */
135
+ pointsLabel: string;
136
+ pointsBalance: string;
137
+ /** e.g. "Gold" */
138
+ rewardsTier: string;
139
+ /** shown next to the tier; defaults to "Tier" */
140
+ rewardsTierLabel: string;
141
+ /** Shown on Google's "issued by" surfaces; defaults to program_name when empty. */
142
+ issuerName: string;
143
+ };
144
+ /**
145
+ * Location of interest (object.merchantLocations). Google shows a geofenced
146
+ * notification when a user dwells within a Google-set radius of the point.
147
+ * Maximum of 10 per pass.
148
+ */
149
+ export type GoogleLocation = {
150
+ /** -90.0 to +90.0 */
151
+ latitude: number;
152
+ /** -180.0 to +180.0 */
153
+ longitude: number;
154
+ };
80
155
  /** Barcode information */
81
156
  export type GoogleBarcode = {
82
157
  /** QR_CODE, PDF_417, AZTEC, CODE_128, EAN_13, ... */
@@ -84,18 +159,26 @@ export type GoogleBarcode = {
84
159
  value: string;
85
160
  altText: string;
86
161
  };
87
- /** Generic pass object data (https://developers.google.com/wallet/generic) */
162
+ export type GooglePass_style_generic = {
163
+ type: 'generic';
164
+ data: GoogleGeneric;
165
+ };
166
+ export type GooglePass_style_offer = {
167
+ type: 'offer';
168
+ data: GoogleOffer;
169
+ };
170
+ export type GooglePass_style_loyalty = {
171
+ type: 'loyalty';
172
+ data: GoogleLoyalty;
173
+ };
174
+ export type GooglePass_style = GooglePass_style_generic | GooglePass_style_offer | GooglePass_style_loyalty;
175
+ /** Pass object data; style-specific fields live in the oneof. */
88
176
  export type GooglePass = {
89
177
  /**
90
178
  * Server-assigned on creation; never set by the client. The full Google
91
179
  * object id is "{issuer_id}.{serial_number}".
92
180
  */
93
181
  serialNumber: string;
94
- /** required; the issuer/program name at the top */
95
- cardTitle: string;
96
- /** required; the main title of the card */
97
- header: string;
98
- subheader: string;
99
182
  /** "#rrggbb" */
100
183
  hexBackgroundColor: string;
101
184
  /** Google Wallet images are referenced by public HTTPS URL, not uploaded. */
@@ -105,11 +188,6 @@ export type GooglePass = {
105
188
  /** Fields shown in the details view (the "back" of the pass). */
106
189
  textModules: GoogleTextModule[];
107
190
  links: GoogleLinkModule[];
108
- /**
109
- * Fields pinned to the front of the card via the class
110
- * cardTemplateOverride: up to 6, rendered as up to 3 rows of 2.
111
- */
112
- cardFields: GoogleTextModule[];
113
191
  /**
114
192
  * ISO 8601; when set, Google auto-expires the pass at this time
115
193
  * (validTimeInterval.end). Empty means no expiry.
@@ -117,6 +195,9 @@ export type GooglePass = {
117
195
  expirationTime: string;
118
196
  /** CTA button on the front of the pass; swappable per campaign. */
119
197
  appLink: GoogleAppLink;
198
+ /** Geofenced-notification points (max 10). */
199
+ locations: GoogleLocation[];
200
+ style: GooglePass_style;
120
201
  };
121
202
  /** Get config request */
122
203
  export type GetConfigRequest = {
@@ -193,6 +274,10 @@ export type GetPassResponse = {
193
274
  export type GooglePassRecord = {
194
275
  serialNumber: string;
195
276
  objectId: string;
277
+ /**
278
+ * Display title/header: card_title/header for generic passes, the
279
+ * style-specific equivalents (provider/title, program/member) otherwise.
280
+ */
196
281
  cardTitle: string;
197
282
  header: string;
198
283
  userId: string;
@@ -200,6 +285,8 @@ export type GooglePassRecord = {
200
285
  updatedAt: Date;
201
286
  /** ACTIVE, INACTIVE */
202
287
  state: string;
288
+ /** generic, offer, loyalty */
289
+ style: string;
203
290
  };
204
291
  /** Set pass state request */
205
292
  export type SetPassStateRequest = {
@@ -234,3 +321,24 @@ export type ListPassesResponse = {
234
321
  perPage: number;
235
322
  total: number;
236
323
  };
324
+ /** Template info */
325
+ export type GoogleTemplateInfo = {
326
+ filename: string;
327
+ name: string;
328
+ description: string;
329
+ /** generic, offer, loyalty */
330
+ style: string;
331
+ };
332
+ export type ListTemplatesRequest = {};
333
+ /** List templates response */
334
+ export type ListTemplatesResponse = {
335
+ templates: GoogleTemplateInfo[];
336
+ };
337
+ /** Get template request */
338
+ export type GetTemplateRequest = {
339
+ filename: string;
340
+ };
341
+ /** Get template response */
342
+ export type GetTemplateResponse = {
343
+ template: GooglePass;
344
+ };