@pushwoosh/rpc-gateway-apple-passkit 0.1.38 → 0.1.40

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
@@ -1,6 +1,406 @@
1
1
  /* eslint-disable */
2
2
  /* Autogenerated code */
3
3
  export const data = {
4
+ "pushwoosh.googlewallet.v1.GoogleWalletService": {
5
+ "type": "S",
6
+ "key": "googleWallet",
7
+ "methods": {
8
+ "GetConfig": {
9
+ "request": "pushwoosh.googlewallet.v1.GetConfigRequest",
10
+ "response": "pushwoosh.googlewallet.v1.GetConfigResponse",
11
+ "method": "get",
12
+ "path": "/api/google/config"
13
+ },
14
+ "ValidatePass": {
15
+ "request": "pushwoosh.googlewallet.v1.ValidatePassRequest",
16
+ "response": "pushwoosh.googlewallet.v1.ValidatePassResponse",
17
+ "method": "post",
18
+ "path": "/api/google/pass/validate"
19
+ },
20
+ "CreatePass": {
21
+ "request": "pushwoosh.googlewallet.v1.CreatePassRequest",
22
+ "response": "pushwoosh.googlewallet.v1.CreatePassResponse",
23
+ "method": "post",
24
+ "path": "/api/google/pass/create"
25
+ },
26
+ "UpdatePass": {
27
+ "request": "pushwoosh.googlewallet.v1.UpdatePassRequest",
28
+ "response": "pushwoosh.googlewallet.v1.UpdatePassResponse",
29
+ "method": "post",
30
+ "path": "/api/google/pass/update/{serial_number}"
31
+ },
32
+ "GetSaveLink": {
33
+ "request": "pushwoosh.googlewallet.v1.GetSaveLinkRequest",
34
+ "response": "pushwoosh.googlewallet.v1.GetSaveLinkResponse",
35
+ "method": "get",
36
+ "path": "/api/google/pass/{application_code}/{serial_number}/save-link"
37
+ },
38
+ "GetPass": {
39
+ "request": "pushwoosh.googlewallet.v1.GetPassRequest",
40
+ "response": "pushwoosh.googlewallet.v1.GetPassResponse",
41
+ "method": "get",
42
+ "path": "/api/google/pass/{application_code}/{serial_number}"
43
+ },
44
+ "ListPasses": {
45
+ "request": "pushwoosh.googlewallet.v1.ListPassesRequest",
46
+ "response": "pushwoosh.googlewallet.v1.ListPassesResponse",
47
+ "method": "get",
48
+ "path": "/api/google/passes"
49
+ },
50
+ "SetPassState": {
51
+ "request": "pushwoosh.googlewallet.v1.SetPassStateRequest",
52
+ "response": "pushwoosh.googlewallet.v1.SetPassStateResponse",
53
+ "method": "post",
54
+ "path": "/api/google/pass/{application_code}/{serial_number}/state"
55
+ },
56
+ "DeletePass": {
57
+ "request": "pushwoosh.googlewallet.v1.DeletePassRequest",
58
+ "response": "pushwoosh.googlewallet.v1.DeletePassResponse",
59
+ "method": "delete",
60
+ "path": "/api/google/pass/{application_code}/{serial_number}"
61
+ }
62
+ }
63
+ },
64
+ "pushwoosh.googlewallet.v1.GoogleTextModule": {
65
+ "type": "I",
66
+ "fields": {
67
+ "id": {
68
+ "type": "string"
69
+ },
70
+ "header": {
71
+ "type": "string"
72
+ },
73
+ "body": {
74
+ "type": "string"
75
+ }
76
+ }
77
+ },
78
+ "pushwoosh.googlewallet.v1.GoogleLinkModule": {
79
+ "type": "I",
80
+ "fields": {
81
+ "uri": {
82
+ "type": "string"
83
+ },
84
+ "description": {
85
+ "type": "string"
86
+ }
87
+ }
88
+ },
89
+ "pushwoosh.googlewallet.v1.GoogleBarcode": {
90
+ "type": "I",
91
+ "fields": {
92
+ "format": {
93
+ "type": "string"
94
+ },
95
+ "value": {
96
+ "type": "string"
97
+ },
98
+ "altText": {
99
+ "type": "string"
100
+ }
101
+ }
102
+ },
103
+ "pushwoosh.googlewallet.v1.GooglePass": {
104
+ "type": "I",
105
+ "fields": {
106
+ "serialNumber": {
107
+ "type": "string"
108
+ },
109
+ "cardTitle": {
110
+ "type": "string"
111
+ },
112
+ "header": {
113
+ "type": "string"
114
+ },
115
+ "subheader": {
116
+ "type": "string"
117
+ },
118
+ "hexBackgroundColor": {
119
+ "type": "string"
120
+ },
121
+ "logoUrl": {
122
+ "type": "string"
123
+ },
124
+ "heroImageUrl": {
125
+ "type": "string"
126
+ },
127
+ "barcode": {
128
+ "type": "pushwoosh.googlewallet.v1.GoogleBarcode"
129
+ },
130
+ "textModules": {
131
+ "type": "pushwoosh.googlewallet.v1.GoogleTextModule",
132
+ "array": true
133
+ },
134
+ "links": {
135
+ "type": "pushwoosh.googlewallet.v1.GoogleLinkModule",
136
+ "array": true
137
+ },
138
+ "cardFields": {
139
+ "type": "pushwoosh.googlewallet.v1.GoogleTextModule",
140
+ "array": true
141
+ },
142
+ "expirationTime": {
143
+ "type": "string"
144
+ }
145
+ }
146
+ },
147
+ "pushwoosh.googlewallet.v1.GetConfigRequest": {
148
+ "type": "I",
149
+ "fields": {
150
+ "applicationCode": {
151
+ "type": "string"
152
+ }
153
+ }
154
+ },
155
+ "pushwoosh.googlewallet.v1.GetConfigResponse": {
156
+ "type": "I",
157
+ "fields": {
158
+ "hasServiceAccount": {
159
+ "type": "boolean"
160
+ },
161
+ "issuerId": {
162
+ "type": "string"
163
+ },
164
+ "serviceAccountEmail": {
165
+ "type": "string"
166
+ }
167
+ }
168
+ },
169
+ "pushwoosh.googlewallet.v1.ValidatePassRequest": {
170
+ "type": "I",
171
+ "fields": {
172
+ "pass": {
173
+ "type": "pushwoosh.googlewallet.v1.GooglePass"
174
+ }
175
+ }
176
+ },
177
+ "pushwoosh.googlewallet.v1.ValidatePassResponse": {
178
+ "type": "I",
179
+ "fields": {
180
+ "valid": {
181
+ "type": "boolean"
182
+ },
183
+ "errors": {
184
+ "type": "string",
185
+ "array": true
186
+ },
187
+ "warnings": {
188
+ "type": "string",
189
+ "array": true
190
+ }
191
+ }
192
+ },
193
+ "pushwoosh.googlewallet.v1.CreatePassRequest": {
194
+ "type": "I",
195
+ "fields": {
196
+ "pass": {
197
+ "type": "pushwoosh.googlewallet.v1.GooglePass"
198
+ },
199
+ "applicationCode": {
200
+ "type": "string"
201
+ },
202
+ "userId": {
203
+ "type": "string"
204
+ }
205
+ }
206
+ },
207
+ "pushwoosh.googlewallet.v1.CreatePassResponse": {
208
+ "type": "I",
209
+ "fields": {
210
+ "serialNumber": {
211
+ "type": "string"
212
+ },
213
+ "objectId": {
214
+ "type": "string"
215
+ },
216
+ "saveLink": {
217
+ "type": "string"
218
+ },
219
+ "message": {
220
+ "type": "string"
221
+ }
222
+ }
223
+ },
224
+ "pushwoosh.googlewallet.v1.UpdatePassRequest": {
225
+ "type": "I",
226
+ "fields": {
227
+ "serialNumber": {
228
+ "type": "string"
229
+ },
230
+ "updates": {
231
+ "type": "pushwoosh.googlewallet.v1.GooglePass"
232
+ },
233
+ "applicationCode": {
234
+ "type": "string"
235
+ },
236
+ "notifyMessage": {
237
+ "type": "string"
238
+ }
239
+ }
240
+ },
241
+ "pushwoosh.googlewallet.v1.UpdatePassResponse": {
242
+ "type": "I",
243
+ "fields": {
244
+ "success": {
245
+ "type": "boolean"
246
+ },
247
+ "message": {
248
+ "type": "string"
249
+ }
250
+ }
251
+ },
252
+ "pushwoosh.googlewallet.v1.GetSaveLinkRequest": {
253
+ "type": "I",
254
+ "fields": {
255
+ "applicationCode": {
256
+ "type": "string"
257
+ },
258
+ "serialNumber": {
259
+ "type": "string"
260
+ }
261
+ }
262
+ },
263
+ "pushwoosh.googlewallet.v1.GetSaveLinkResponse": {
264
+ "type": "I",
265
+ "fields": {
266
+ "saveLink": {
267
+ "type": "string"
268
+ }
269
+ }
270
+ },
271
+ "pushwoosh.googlewallet.v1.GetPassRequest": {
272
+ "type": "I",
273
+ "fields": {
274
+ "applicationCode": {
275
+ "type": "string"
276
+ },
277
+ "serialNumber": {
278
+ "type": "string"
279
+ }
280
+ }
281
+ },
282
+ "pushwoosh.googlewallet.v1.GetPassResponse": {
283
+ "type": "I",
284
+ "fields": {
285
+ "pass": {
286
+ "type": "pushwoosh.googlewallet.v1.GooglePass"
287
+ }
288
+ }
289
+ },
290
+ "pushwoosh.googlewallet.v1.GooglePassRecord": {
291
+ "type": "I",
292
+ "fields": {
293
+ "serialNumber": {
294
+ "type": "string"
295
+ },
296
+ "objectId": {
297
+ "type": "string"
298
+ },
299
+ "cardTitle": {
300
+ "type": "string"
301
+ },
302
+ "header": {
303
+ "type": "string"
304
+ },
305
+ "userId": {
306
+ "type": "string"
307
+ },
308
+ "createdAt": {
309
+ "type": "Date"
310
+ },
311
+ "updatedAt": {
312
+ "type": "Date"
313
+ },
314
+ "state": {
315
+ "type": "string"
316
+ }
317
+ }
318
+ },
319
+ "pushwoosh.googlewallet.v1.SetPassStateRequest": {
320
+ "type": "I",
321
+ "fields": {
322
+ "applicationCode": {
323
+ "type": "string"
324
+ },
325
+ "serialNumber": {
326
+ "type": "string"
327
+ },
328
+ "active": {
329
+ "type": "boolean"
330
+ }
331
+ }
332
+ },
333
+ "pushwoosh.googlewallet.v1.SetPassStateResponse": {
334
+ "type": "I",
335
+ "fields": {}
336
+ },
337
+ "pushwoosh.googlewallet.v1.DeletePassRequest": {
338
+ "type": "I",
339
+ "fields": {
340
+ "applicationCode": {
341
+ "type": "string"
342
+ },
343
+ "serialNumber": {
344
+ "type": "string"
345
+ }
346
+ }
347
+ },
348
+ "pushwoosh.googlewallet.v1.DeletePassResponse": {
349
+ "type": "I",
350
+ "fields": {}
351
+ },
352
+ "pushwoosh.googlewallet.v1.ListPassesRequest.OrderBy": {
353
+ "type": "E",
354
+ "values": [
355
+ "UPDATED",
356
+ "CREATED"
357
+ ]
358
+ },
359
+ "pushwoosh.googlewallet.v1.ListPassesRequest.OrderDirection": {
360
+ "type": "E",
361
+ "values": [
362
+ "DESC",
363
+ "ASC"
364
+ ]
365
+ },
366
+ "pushwoosh.googlewallet.v1.ListPassesRequest": {
367
+ "type": "I",
368
+ "fields": {
369
+ "applicationCode": {
370
+ "type": "string"
371
+ },
372
+ "orderBy": {
373
+ "type": "pushwoosh.googlewallet.v1.ListPassesRequest.OrderBy"
374
+ },
375
+ "orderDirection": {
376
+ "type": "pushwoosh.googlewallet.v1.ListPassesRequest.OrderDirection"
377
+ },
378
+ "page": {
379
+ "type": "number"
380
+ },
381
+ "perPage": {
382
+ "type": "number"
383
+ }
384
+ }
385
+ },
386
+ "pushwoosh.googlewallet.v1.ListPassesResponse": {
387
+ "type": "I",
388
+ "fields": {
389
+ "passes": {
390
+ "type": "pushwoosh.googlewallet.v1.GooglePassRecord",
391
+ "array": true
392
+ },
393
+ "page": {
394
+ "type": "number"
395
+ },
396
+ "perPage": {
397
+ "type": "number"
398
+ },
399
+ "total": {
400
+ "type": "number"
401
+ }
402
+ }
403
+ },
4
404
  "pushwoosh.passkit.v1.PassKitService": {
5
405
  "type": "S",
6
406
  "key": "passKit",
package/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
+ import { GoogleWalletService as pushwoosh_googlewallet_v1_GoogleWalletService } from './pushwoosh_googlewallet_v1';
1
2
  import { PassKitService as pushwoosh_passkit_v1_PassKitService } from './pushwoosh_passkit_v1';
2
3
  import { PassKitWebService as pushwoosh_passkit_v1_PassKitWebService } from './pushwoosh_passkit_v1';
3
4
  export type API = {
5
+ googleWallet: pushwoosh_googlewallet_v1_GoogleWalletService;
4
6
  passKit: pushwoosh_passkit_v1_PassKitService;
5
7
  passKitWeb: pushwoosh_passkit_v1_PassKitWebService;
6
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-apple-passkit",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "description": "Apple PassKit Service api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -0,0 +1,216 @@
1
+ import { RpcMethod } from './commonTypes';
2
+ export type GoogleWalletService_GetConfig = RpcMethod<GetConfigRequest, GetConfigResponse>;
3
+ export type GoogleWalletService_ValidatePass = RpcMethod<ValidatePassRequest, ValidatePassResponse>;
4
+ export type GoogleWalletService_CreatePass = RpcMethod<CreatePassRequest, CreatePassResponse>;
5
+ export type GoogleWalletService_UpdatePass = RpcMethod<UpdatePassRequest, UpdatePassResponse>;
6
+ export type GoogleWalletService_GetSaveLink = RpcMethod<GetSaveLinkRequest, GetSaveLinkResponse>;
7
+ export type GoogleWalletService_GetPass = RpcMethod<GetPassRequest, GetPassResponse>;
8
+ export type GoogleWalletService_ListPasses = RpcMethod<ListPassesRequest, ListPassesResponse>;
9
+ export type GoogleWalletService_SetPassState = RpcMethod<SetPassStateRequest, SetPassStateResponse>;
10
+ export type GoogleWalletService_DeletePass = RpcMethod<DeletePassRequest, DeletePassResponse>;
11
+ /**
12
+ * Google Wallet Service - issues Generic passes via the Google Wallet API.
13
+ *
14
+ * Unlike Apple PassKit there is no signed file to host: the pass class and
15
+ * object live on Google's side (walletobjects REST API), and the user installs
16
+ * the pass via a "save link" - an RS256 JWT signed with the issuer's service
17
+ * account key. Updates are plain object patches; Google delivers them to
18
+ * devices itself (no push infrastructure on our side).
19
+ */
20
+ export interface GoogleWalletService {
21
+ /** Get Google Wallet configuration state for an application */
22
+ GetConfig: GoogleWalletService_GetConfig;
23
+ /** Validate a pass configuration */
24
+ ValidatePass: GoogleWalletService_ValidatePass;
25
+ /** Create a new pass object in Google Wallet */
26
+ CreatePass: GoogleWalletService_CreatePass;
27
+ /** Update an existing pass object (patch; Google delivers the update) */
28
+ UpdatePass: GoogleWalletService_UpdatePass;
29
+ /**
30
+ * Get an "Add to Google Wallet" save link for an already created pass.
31
+ * The link is a thin JWT: it references the object by id only; the object
32
+ * itself must already exist (created via CreatePass).
33
+ */
34
+ GetSaveLink: GoogleWalletService_GetSaveLink;
35
+ /** Get a single pass by serial number. */
36
+ GetPass: GoogleWalletService_GetPass;
37
+ /** List passes of an application. */
38
+ ListPasses: GoogleWalletService_ListPasses;
39
+ /**
40
+ * Activate or invalidate a pass (Google state ACTIVE/INACTIVE). An
41
+ * invalidated pass moves to the user's "Expired passes" section; the record
42
+ * is kept so it can be re-activated.
43
+ */
44
+ SetPassState: GoogleWalletService_SetPassState;
45
+ /**
46
+ * Delete a pass: invalidate it in Google (it cannot be force-removed from a
47
+ * user's device) and drop our stored record.
48
+ */
49
+ DeletePass: GoogleWalletService_DeletePass;
50
+ }
51
+ /** Text module - a labeled block of text on the pass details view */
52
+ export type GoogleTextModule = {
53
+ id: string;
54
+ header: string;
55
+ body: string;
56
+ };
57
+ /** Link module - an external link on the pass details view */
58
+ export type GoogleLinkModule = {
59
+ uri: string;
60
+ description: string;
61
+ };
62
+ /** Barcode information */
63
+ export type GoogleBarcode = {
64
+ /** QR_CODE, PDF_417, AZTEC, CODE_128, EAN_13, ... */
65
+ format: string;
66
+ value: string;
67
+ altText: string;
68
+ };
69
+ /** Generic pass object data (https://developers.google.com/wallet/generic) */
70
+ export type GooglePass = {
71
+ /**
72
+ * Server-assigned on creation; never set by the client. The full Google
73
+ * object id is "{issuer_id}.{serial_number}".
74
+ */
75
+ serialNumber: string;
76
+ /** required; the issuer/program name at the top */
77
+ cardTitle: string;
78
+ /** required; the main title of the card */
79
+ header: string;
80
+ subheader: string;
81
+ /** "#rrggbb" */
82
+ hexBackgroundColor: string;
83
+ /** Google Wallet images are referenced by public HTTPS URL, not uploaded. */
84
+ logoUrl: string;
85
+ heroImageUrl: string;
86
+ barcode: GoogleBarcode;
87
+ /** Fields shown in the details view (the "back" of the pass). */
88
+ textModules: GoogleTextModule[];
89
+ links: GoogleLinkModule[];
90
+ /**
91
+ * Fields pinned to the front of the card via the class
92
+ * cardTemplateOverride: up to 6, rendered as up to 3 rows of 2.
93
+ */
94
+ cardFields: GoogleTextModule[];
95
+ /**
96
+ * ISO 8601; when set, Google auto-expires the pass at this time
97
+ * (validTimeInterval.end). Empty means no expiry.
98
+ */
99
+ expirationTime: string;
100
+ };
101
+ /** Get config request */
102
+ export type GetConfigRequest = {
103
+ applicationCode: string;
104
+ };
105
+ /** Get config response */
106
+ export type GetConfigResponse = {
107
+ hasServiceAccount: boolean;
108
+ issuerId: string;
109
+ serviceAccountEmail: string;
110
+ };
111
+ /** Validate pass request */
112
+ export type ValidatePassRequest = {
113
+ pass: GooglePass;
114
+ };
115
+ /** Validate pass response */
116
+ export type ValidatePassResponse = {
117
+ valid: boolean;
118
+ errors: string[];
119
+ warnings: string[];
120
+ };
121
+ /** Create pass request */
122
+ export type CreatePassRequest = {
123
+ pass: GooglePass;
124
+ applicationCode: string;
125
+ /** Pushwoosh User ID the pass is issued to (required). */
126
+ userId: string;
127
+ };
128
+ /** Create pass response */
129
+ export type CreatePassResponse = {
130
+ /** Server-assigned unique identity of the created pass (object id suffix). */
131
+ serialNumber: string;
132
+ /** Full Google Wallet object id: "{issuer_id}.{serial_number}". */
133
+ objectId: string;
134
+ /** "Add to Google Wallet" link: https://pay.google.com/gp/v/save/{jwt} */
135
+ saveLink: string;
136
+ message: string;
137
+ };
138
+ /** Update pass request */
139
+ export type UpdatePassRequest = {
140
+ serialNumber: string;
141
+ updates: GooglePass;
142
+ applicationCode: string;
143
+ /**
144
+ * When non-empty, push an Android notification with this text to everyone
145
+ * who saved the pass; empty means a silent update.
146
+ */
147
+ notifyMessage: string;
148
+ };
149
+ /** Update pass response */
150
+ export type UpdatePassResponse = {
151
+ success: boolean;
152
+ message: string;
153
+ };
154
+ /** Get save link request */
155
+ export type GetSaveLinkRequest = {
156
+ applicationCode: string;
157
+ serialNumber: string;
158
+ };
159
+ /** Get save link response */
160
+ export type GetSaveLinkResponse = {
161
+ saveLink: string;
162
+ };
163
+ /** Get pass request */
164
+ export type GetPassRequest = {
165
+ applicationCode: string;
166
+ serialNumber: string;
167
+ };
168
+ /** Get pass response */
169
+ export type GetPassResponse = {
170
+ pass: GooglePass;
171
+ };
172
+ /** Pass record for listing. */
173
+ export type GooglePassRecord = {
174
+ serialNumber: string;
175
+ objectId: string;
176
+ cardTitle: string;
177
+ header: string;
178
+ userId: string;
179
+ createdAt: Date;
180
+ updatedAt: Date;
181
+ /** ACTIVE, INACTIVE */
182
+ state: string;
183
+ };
184
+ /** Set pass state request */
185
+ export type SetPassStateRequest = {
186
+ applicationCode: string;
187
+ serialNumber: string;
188
+ /** true => ACTIVE, false => INACTIVE (invalidated) */
189
+ active: boolean;
190
+ };
191
+ export type SetPassStateResponse = {};
192
+ /** Delete pass request */
193
+ export type DeletePassRequest = {
194
+ applicationCode: string;
195
+ serialNumber: string;
196
+ };
197
+ export type DeletePassResponse = {};
198
+ export type ListPassesRequest_OrderBy = 'UPDATED' | 'CREATED';
199
+ export type ListPassesRequest_OrderDirection = 'DESC' | 'ASC';
200
+ /** List passes request */
201
+ export type ListPassesRequest = {
202
+ applicationCode: string;
203
+ orderBy: ListPassesRequest_OrderBy;
204
+ orderDirection: ListPassesRequest_OrderDirection;
205
+ /** zero-based page index */
206
+ page: number;
207
+ /** 0 => server default page size */
208
+ perPage: number;
209
+ };
210
+ /** List passes response */
211
+ export type ListPassesResponse = {
212
+ passes: GooglePassRecord[];
213
+ page: number;
214
+ perPage: number;
215
+ total: number;
216
+ };
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ /* Autogenerated code */
3
+ export {};