@pushwoosh/rpc-gateway-apple-passkit 0.1.39 → 0.1.41

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
@@ -34,6 +34,30 @@ export const data = {
34
34
  "response": "pushwoosh.googlewallet.v1.GetSaveLinkResponse",
35
35
  "method": "get",
36
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}"
37
61
  }
38
62
  }
39
63
  },
@@ -110,6 +134,13 @@ export const data = {
110
134
  "links": {
111
135
  "type": "pushwoosh.googlewallet.v1.GoogleLinkModule",
112
136
  "array": true
137
+ },
138
+ "cardFields": {
139
+ "type": "pushwoosh.googlewallet.v1.GoogleTextModule",
140
+ "array": true
141
+ },
142
+ "expirationTime": {
143
+ "type": "string"
113
144
  }
114
145
  }
115
146
  },
@@ -201,6 +232,9 @@ export const data = {
201
232
  },
202
233
  "applicationCode": {
203
234
  "type": "string"
235
+ },
236
+ "notifyMessage": {
237
+ "type": "string"
204
238
  }
205
239
  }
206
240
  },
@@ -234,6 +268,139 @@ export const data = {
234
268
  }
235
269
  }
236
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
+ },
237
404
  "pushwoosh.passkit.v1.PassKitService": {
238
405
  "type": "S",
239
406
  "key": "passKit",
@@ -274,6 +441,12 @@ export const data = {
274
441
  "method": "post",
275
442
  "path": "/api/pass/update/{serial_number}"
276
443
  },
444
+ "SendPassMessage": {
445
+ "request": "pushwoosh.passkit.v1.SendPassMessageRequest",
446
+ "response": "pushwoosh.passkit.v1.UpdatePassResponse",
447
+ "method": "post",
448
+ "path": "/api/pass/message/{serial_number}"
449
+ },
277
450
  "DeletePass": {
278
451
  "request": "pushwoosh.passkit.v1.DeletePassRequest",
279
452
  "response": "pushwoosh.passkit.v1.DeletePassResponse",
@@ -791,6 +964,20 @@ export const data = {
791
964
  }
792
965
  }
793
966
  },
967
+ "pushwoosh.passkit.v1.SendPassMessageRequest": {
968
+ "type": "I",
969
+ "fields": {
970
+ "serialNumber": {
971
+ "type": "string"
972
+ },
973
+ "text": {
974
+ "type": "string"
975
+ },
976
+ "applicationCode": {
977
+ "type": "string"
978
+ }
979
+ }
980
+ },
794
981
  "pushwoosh.passkit.v1.DeletePassRequest": {
795
982
  "type": "I",
796
983
  "fields": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-apple-passkit",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "description": "Apple PassKit Service api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -4,6 +4,10 @@ export type GoogleWalletService_ValidatePass = RpcMethod<ValidatePassRequest, Va
4
4
  export type GoogleWalletService_CreatePass = RpcMethod<CreatePassRequest, CreatePassResponse>;
5
5
  export type GoogleWalletService_UpdatePass = RpcMethod<UpdatePassRequest, UpdatePassResponse>;
6
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>;
7
11
  /**
8
12
  * Google Wallet Service - issues Generic passes via the Google Wallet API.
9
13
  *
@@ -28,6 +32,21 @@ export interface GoogleWalletService {
28
32
  * itself must already exist (created via CreatePass).
29
33
  */
30
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;
31
50
  }
32
51
  /** Text module - a labeled block of text on the pass details view */
33
52
  export type GoogleTextModule = {
@@ -65,8 +84,19 @@ export type GooglePass = {
65
84
  logoUrl: string;
66
85
  heroImageUrl: string;
67
86
  barcode: GoogleBarcode;
87
+ /** Fields shown in the details view (the "back" of the pass). */
68
88
  textModules: GoogleTextModule[];
69
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;
70
100
  };
71
101
  /** Get config request */
72
102
  export type GetConfigRequest = {
@@ -92,11 +122,7 @@ export type ValidatePassResponse = {
92
122
  export type CreatePassRequest = {
93
123
  pass: GooglePass;
94
124
  applicationCode: string;
95
- /**
96
- * Pushwoosh User ID the pass is issued to. Accepted but not yet stored:
97
- * it becomes meaningful with pass persistence (GoogleWalletPasses
98
- * collection follow-up), mirroring PassKitService.CreatePass.
99
- */
125
+ /** Pushwoosh User ID the pass is issued to (required). */
100
126
  userId: string;
101
127
  };
102
128
  /** Create pass response */
@@ -114,6 +140,11 @@ export type UpdatePassRequest = {
114
140
  serialNumber: string;
115
141
  updates: GooglePass;
116
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;
117
148
  };
118
149
  /** Update pass response */
119
150
  export type UpdatePassResponse = {
@@ -129,3 +160,57 @@ export type GetSaveLinkRequest = {
129
160
  export type GetSaveLinkResponse = {
130
161
  saveLink: string;
131
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
+ };
@@ -5,6 +5,7 @@ export type PassKitService_GetConfig = RpcMethod<GetConfigRequest, GetConfigResp
5
5
  export type PassKitService_ListTemplates = RpcMethod<ListTemplatesRequest, ListTemplatesResponse>;
6
6
  export type PassKitService_GetTemplate = RpcMethod<GetTemplateRequest, GetTemplateResponse>;
7
7
  export type PassKitService_UpdatePass = RpcMethod<UpdatePassRequest, UpdatePassResponse>;
8
+ export type PassKitService_SendPassMessage = RpcMethod<SendPassMessageRequest, UpdatePassResponse>;
8
9
  export type PassKitService_DeletePass = RpcMethod<DeletePassRequest, DeletePassResponse>;
9
10
  export type PassKitService_ListPasses = RpcMethod<ListPassesRequest, ListPassesResponse>;
10
11
  export type PassKitService_GetPass = RpcMethod<GetPassRequest, GetPassResponse>;
@@ -24,6 +25,13 @@ export interface PassKitService {
24
25
  GetTemplate: PassKitService_GetTemplate;
25
26
  /** Update an existing pass */
26
27
  UpdatePass: PassKitService_UpdatePass;
28
+ /**
29
+ * Send a lock-screen message to every device that installed the pass. Writes
30
+ * the text into a reserved hidden back field (with a changeMessage) and pushes;
31
+ * the field is cleared again shortly after so the back stays blank and the same
32
+ * text can be sent again later.
33
+ */
34
+ SendPassMessage: PassKitService_SendPassMessage;
27
35
  /** Delete an existing pass */
28
36
  DeletePass: PassKitService_DeletePass;
29
37
  /** List all passes */
@@ -253,6 +261,12 @@ export type UpdatePassResponse = {
253
261
  updateTag: number;
254
262
  message: string;
255
263
  };
264
+ /** Send pass message request */
265
+ export type SendPassMessageRequest = {
266
+ serialNumber: string;
267
+ text: string;
268
+ applicationCode: string;
269
+ };
256
270
  /** Delete pass request */
257
271
  export type DeletePassRequest = {
258
272
  serialNumber: string;