@pushwoosh/rpc-gateway-apple-passkit 0.1.52 → 0.1.54

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,6 +112,76 @@ export const data = {
100
112
  }
101
113
  }
102
114
  },
115
+ "pushwoosh.googlewallet.v1.GoogleGeneric": {
116
+ "type": "I",
117
+ "fields": {
118
+ "cardTitle": {
119
+ "type": "string"
120
+ },
121
+ "header": {
122
+ "type": "string"
123
+ },
124
+ "subheader": {
125
+ "type": "string"
126
+ },
127
+ "cardFields": {
128
+ "type": "pushwoosh.googlewallet.v1.GoogleTextModule",
129
+ "array": true
130
+ }
131
+ }
132
+ },
133
+ "pushwoosh.googlewallet.v1.GoogleOffer": {
134
+ "type": "I",
135
+ "fields": {
136
+ "title": {
137
+ "type": "string"
138
+ },
139
+ "provider": {
140
+ "type": "string"
141
+ },
142
+ "details": {
143
+ "type": "string"
144
+ },
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
+ },
103
185
  "pushwoosh.googlewallet.v1.GoogleLocation": {
104
186
  "type": "I",
105
187
  "fields": {
@@ -131,15 +213,6 @@ export const data = {
131
213
  "serialNumber": {
132
214
  "type": "string"
133
215
  },
134
- "cardTitle": {
135
- "type": "string"
136
- },
137
- "header": {
138
- "type": "string"
139
- },
140
- "subheader": {
141
- "type": "string"
142
- },
143
216
  "hexBackgroundColor": {
144
217
  "type": "string"
145
218
  },
@@ -160,10 +233,6 @@ export const data = {
160
233
  "type": "pushwoosh.googlewallet.v1.GoogleLinkModule",
161
234
  "array": true
162
235
  },
163
- "cardFields": {
164
- "type": "pushwoosh.googlewallet.v1.GoogleTextModule",
165
- "array": true
166
- },
167
236
  "expirationTime": {
168
237
  "type": "string"
169
238
  },
@@ -173,6 +242,24 @@ export const data = {
173
242
  "locations": {
174
243
  "type": "pushwoosh.googlewallet.v1.GoogleLocation",
175
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
+ ]
176
263
  }
177
264
  }
178
265
  },
@@ -345,6 +432,9 @@ export const data = {
345
432
  },
346
433
  "state": {
347
434
  "type": "string"
435
+ },
436
+ "style": {
437
+ "type": "string"
348
438
  }
349
439
  }
350
440
  },
@@ -433,6 +523,52 @@ export const data = {
433
523
  }
434
524
  }
435
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
+ },
436
572
  "pushwoosh.passkit.v1.PassKitService": {
437
573
  "type": "S",
438
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.52",
3
+ "version": "0.1.54",
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,64 @@ 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
+ };
80
144
  /**
81
145
  * Location of interest (object.merchantLocations). Google shows a geofenced
82
146
  * notification when a user dwells within a Google-set radius of the point.
@@ -95,18 +159,26 @@ export type GoogleBarcode = {
95
159
  value: string;
96
160
  altText: string;
97
161
  };
98
- /** 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. */
99
176
  export type GooglePass = {
100
177
  /**
101
178
  * Server-assigned on creation; never set by the client. The full Google
102
179
  * object id is "{issuer_id}.{serial_number}".
103
180
  */
104
181
  serialNumber: string;
105
- /** required; the issuer/program name at the top */
106
- cardTitle: string;
107
- /** required; the main title of the card */
108
- header: string;
109
- subheader: string;
110
182
  /** "#rrggbb" */
111
183
  hexBackgroundColor: string;
112
184
  /** Google Wallet images are referenced by public HTTPS URL, not uploaded. */
@@ -116,11 +188,6 @@ export type GooglePass = {
116
188
  /** Fields shown in the details view (the "back" of the pass). */
117
189
  textModules: GoogleTextModule[];
118
190
  links: GoogleLinkModule[];
119
- /**
120
- * Fields pinned to the front of the card via the class
121
- * cardTemplateOverride: up to 6, rendered as up to 3 rows of 2.
122
- */
123
- cardFields: GoogleTextModule[];
124
191
  /**
125
192
  * ISO 8601; when set, Google auto-expires the pass at this time
126
193
  * (validTimeInterval.end). Empty means no expiry.
@@ -130,6 +197,7 @@ export type GooglePass = {
130
197
  appLink: GoogleAppLink;
131
198
  /** Geofenced-notification points (max 10). */
132
199
  locations: GoogleLocation[];
200
+ style: GooglePass_style;
133
201
  };
134
202
  /** Get config request */
135
203
  export type GetConfigRequest = {
@@ -206,6 +274,10 @@ export type GetPassResponse = {
206
274
  export type GooglePassRecord = {
207
275
  serialNumber: string;
208
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
+ */
209
281
  cardTitle: string;
210
282
  header: string;
211
283
  userId: string;
@@ -213,6 +285,8 @@ export type GooglePassRecord = {
213
285
  updatedAt: Date;
214
286
  /** ACTIVE, INACTIVE */
215
287
  state: string;
288
+ /** generic, offer, loyalty */
289
+ style: string;
216
290
  };
217
291
  /** Set pass state request */
218
292
  export type SetPassStateRequest = {
@@ -247,3 +321,24 @@ export type ListPassesResponse = {
247
321
  perPage: number;
248
322
  total: number;
249
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
+ };