@pushwoosh/rpc-gateway-apple-passkit 0.1.25
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/commonTypes.d.ts +10 -0
- package/commonTypes.js +3 -0
- package/data.d.ts +2 -0
- package/data.js +760 -0
- package/index.d.ts +7 -0
- package/index.js +3 -0
- package/package.json +19 -0
- package/pushwoosh_passkit_v1.d.ts +342 -0
- package/pushwoosh_passkit_v1.js +3 -0
- package/types.d.ts +59 -0
- package/types.js +3 -0
package/commonTypes.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type Duration = number;
|
|
2
|
+
export type RpcMethod<Req, Res> = ((request: Req) => Promise<Res>) & {
|
|
3
|
+
safe(request: Req): Promise<[{
|
|
4
|
+
error: unknown;
|
|
5
|
+
}, null] | [null, Res]>;
|
|
6
|
+
};
|
|
7
|
+
export type RpcMethodV3<Req, Res, Err> = ((request: Req) => Promise<Res>) & {
|
|
8
|
+
safe(request: Req): Promise<[Err, null] | [null, Res]>;
|
|
9
|
+
parseError(e: unknown): Err;
|
|
10
|
+
};
|
package/commonTypes.js
ADDED
package/data.d.ts
ADDED
package/data.js
ADDED
|
@@ -0,0 +1,760 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* Autogenerated code */
|
|
3
|
+
export const data = {
|
|
4
|
+
"pushwoosh.passkit.v1.PassKitService": {
|
|
5
|
+
"type": "S",
|
|
6
|
+
"key": "passKit",
|
|
7
|
+
"methods": {
|
|
8
|
+
"ValidatePass": {
|
|
9
|
+
"request": "pushwoosh.passkit.v1.ValidatePassRequest",
|
|
10
|
+
"response": "pushwoosh.passkit.v1.ValidatePassResponse",
|
|
11
|
+
"method": "post",
|
|
12
|
+
"path": "/api/pass/validate"
|
|
13
|
+
},
|
|
14
|
+
"CreatePass": {
|
|
15
|
+
"request": "pushwoosh.passkit.v1.CreatePassRequest",
|
|
16
|
+
"response": "pushwoosh.passkit.v1.CreatePassResponse",
|
|
17
|
+
"method": "post",
|
|
18
|
+
"path": "/api/pass/create"
|
|
19
|
+
},
|
|
20
|
+
"GetConfig": {
|
|
21
|
+
"request": "pushwoosh.passkit.v1.GetConfigRequest",
|
|
22
|
+
"response": "pushwoosh.passkit.v1.GetConfigResponse",
|
|
23
|
+
"method": "get",
|
|
24
|
+
"path": "/api/config"
|
|
25
|
+
},
|
|
26
|
+
"ListTemplates": {
|
|
27
|
+
"request": "{}",
|
|
28
|
+
"response": "pushwoosh.passkit.v1.ListTemplatesResponse",
|
|
29
|
+
"method": "get",
|
|
30
|
+
"path": "/api/templates"
|
|
31
|
+
},
|
|
32
|
+
"GetTemplate": {
|
|
33
|
+
"request": "pushwoosh.passkit.v1.GetTemplateRequest",
|
|
34
|
+
"response": "pushwoosh.passkit.v1.GetTemplateResponse",
|
|
35
|
+
"method": "get",
|
|
36
|
+
"path": "/api/templates/{filename}"
|
|
37
|
+
},
|
|
38
|
+
"UpdatePass": {
|
|
39
|
+
"request": "pushwoosh.passkit.v1.UpdatePassRequest",
|
|
40
|
+
"response": "pushwoosh.passkit.v1.UpdatePassResponse",
|
|
41
|
+
"method": "post",
|
|
42
|
+
"path": "/api/pass/update/{serial_number}"
|
|
43
|
+
},
|
|
44
|
+
"ListPasses": {
|
|
45
|
+
"request": "pushwoosh.passkit.v1.ListPassesRequest",
|
|
46
|
+
"response": "pushwoosh.passkit.v1.ListPassesResponse",
|
|
47
|
+
"method": "get",
|
|
48
|
+
"path": "/api/passes"
|
|
49
|
+
},
|
|
50
|
+
"GetPassRegistrations": {
|
|
51
|
+
"request": "pushwoosh.passkit.v1.GetPassRegistrationsRequest",
|
|
52
|
+
"response": "pushwoosh.passkit.v1.GetPassRegistrationsResponse",
|
|
53
|
+
"method": "get",
|
|
54
|
+
"path": "/api/pass/{serial_number}/registrations"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"pushwoosh.passkit.v1.PassField": {
|
|
59
|
+
"type": "I",
|
|
60
|
+
"fields": {
|
|
61
|
+
"key": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
"label": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"value": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
},
|
|
70
|
+
"changeMessage": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"textAlignment": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
},
|
|
76
|
+
"dateStyle": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
},
|
|
79
|
+
"timeStyle": {
|
|
80
|
+
"type": "string"
|
|
81
|
+
},
|
|
82
|
+
"isRelative": {
|
|
83
|
+
"type": "boolean"
|
|
84
|
+
},
|
|
85
|
+
"numberStyle": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"currencyCode": {
|
|
89
|
+
"type": "string"
|
|
90
|
+
},
|
|
91
|
+
"dataDetectorTypes": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"array": true
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"pushwoosh.passkit.v1.PassBarcode": {
|
|
98
|
+
"type": "I",
|
|
99
|
+
"fields": {
|
|
100
|
+
"format": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
"message": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"messageEncoding": {
|
|
107
|
+
"type": "string"
|
|
108
|
+
},
|
|
109
|
+
"altText": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"pushwoosh.passkit.v1.PassLocation": {
|
|
115
|
+
"type": "I",
|
|
116
|
+
"fields": {
|
|
117
|
+
"latitude": {
|
|
118
|
+
"type": "number"
|
|
119
|
+
},
|
|
120
|
+
"longitude": {
|
|
121
|
+
"type": "number"
|
|
122
|
+
},
|
|
123
|
+
"altitude": {
|
|
124
|
+
"type": "number"
|
|
125
|
+
},
|
|
126
|
+
"relevantText": {
|
|
127
|
+
"type": "string"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"pushwoosh.passkit.v1.PassBeacon": {
|
|
132
|
+
"type": "I",
|
|
133
|
+
"fields": {
|
|
134
|
+
"proximityUuid": {
|
|
135
|
+
"type": "string"
|
|
136
|
+
},
|
|
137
|
+
"major": {
|
|
138
|
+
"type": "number"
|
|
139
|
+
},
|
|
140
|
+
"minor": {
|
|
141
|
+
"type": "number"
|
|
142
|
+
},
|
|
143
|
+
"relevantText": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"pushwoosh.passkit.v1.BoardingPass": {
|
|
149
|
+
"type": "I",
|
|
150
|
+
"fields": {
|
|
151
|
+
"transitType": {
|
|
152
|
+
"type": "string"
|
|
153
|
+
},
|
|
154
|
+
"headerFields": {
|
|
155
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
156
|
+
"array": true
|
|
157
|
+
},
|
|
158
|
+
"primaryFields": {
|
|
159
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
160
|
+
"array": true
|
|
161
|
+
},
|
|
162
|
+
"secondaryFields": {
|
|
163
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
164
|
+
"array": true
|
|
165
|
+
},
|
|
166
|
+
"auxiliaryFields": {
|
|
167
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
168
|
+
"array": true
|
|
169
|
+
},
|
|
170
|
+
"backFields": {
|
|
171
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
172
|
+
"array": true
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"pushwoosh.passkit.v1.Coupon": {
|
|
177
|
+
"type": "I",
|
|
178
|
+
"fields": {
|
|
179
|
+
"headerFields": {
|
|
180
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
181
|
+
"array": true
|
|
182
|
+
},
|
|
183
|
+
"primaryFields": {
|
|
184
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
185
|
+
"array": true
|
|
186
|
+
},
|
|
187
|
+
"secondaryFields": {
|
|
188
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
189
|
+
"array": true
|
|
190
|
+
},
|
|
191
|
+
"auxiliaryFields": {
|
|
192
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
193
|
+
"array": true
|
|
194
|
+
},
|
|
195
|
+
"backFields": {
|
|
196
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
197
|
+
"array": true
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"pushwoosh.passkit.v1.EventTicket": {
|
|
202
|
+
"type": "I",
|
|
203
|
+
"fields": {
|
|
204
|
+
"headerFields": {
|
|
205
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
206
|
+
"array": true
|
|
207
|
+
},
|
|
208
|
+
"primaryFields": {
|
|
209
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
210
|
+
"array": true
|
|
211
|
+
},
|
|
212
|
+
"secondaryFields": {
|
|
213
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
214
|
+
"array": true
|
|
215
|
+
},
|
|
216
|
+
"auxiliaryFields": {
|
|
217
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
218
|
+
"array": true
|
|
219
|
+
},
|
|
220
|
+
"backFields": {
|
|
221
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
222
|
+
"array": true
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"pushwoosh.passkit.v1.StoreCard": {
|
|
227
|
+
"type": "I",
|
|
228
|
+
"fields": {
|
|
229
|
+
"headerFields": {
|
|
230
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
231
|
+
"array": true
|
|
232
|
+
},
|
|
233
|
+
"primaryFields": {
|
|
234
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
235
|
+
"array": true
|
|
236
|
+
},
|
|
237
|
+
"secondaryFields": {
|
|
238
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
239
|
+
"array": true
|
|
240
|
+
},
|
|
241
|
+
"auxiliaryFields": {
|
|
242
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
243
|
+
"array": true
|
|
244
|
+
},
|
|
245
|
+
"backFields": {
|
|
246
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
247
|
+
"array": true
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"pushwoosh.passkit.v1.Generic": {
|
|
252
|
+
"type": "I",
|
|
253
|
+
"fields": {
|
|
254
|
+
"headerFields": {
|
|
255
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
256
|
+
"array": true
|
|
257
|
+
},
|
|
258
|
+
"primaryFields": {
|
|
259
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
260
|
+
"array": true
|
|
261
|
+
},
|
|
262
|
+
"secondaryFields": {
|
|
263
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
264
|
+
"array": true
|
|
265
|
+
},
|
|
266
|
+
"auxiliaryFields": {
|
|
267
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
268
|
+
"array": true
|
|
269
|
+
},
|
|
270
|
+
"backFields": {
|
|
271
|
+
"type": "pushwoosh.passkit.v1.PassField",
|
|
272
|
+
"array": true
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"pushwoosh.passkit.v1.Pass": {
|
|
277
|
+
"type": "I",
|
|
278
|
+
"fields": {
|
|
279
|
+
"formatVersion": {
|
|
280
|
+
"type": "number"
|
|
281
|
+
},
|
|
282
|
+
"passTypeIdentifier": {
|
|
283
|
+
"type": "string"
|
|
284
|
+
},
|
|
285
|
+
"serialNumber": {
|
|
286
|
+
"type": "string"
|
|
287
|
+
},
|
|
288
|
+
"teamIdentifier": {
|
|
289
|
+
"type": "string"
|
|
290
|
+
},
|
|
291
|
+
"organizationName": {
|
|
292
|
+
"type": "string"
|
|
293
|
+
},
|
|
294
|
+
"description": {
|
|
295
|
+
"type": "string"
|
|
296
|
+
},
|
|
297
|
+
"boardingPass": {
|
|
298
|
+
"type": "pushwoosh.passkit.v1.BoardingPass"
|
|
299
|
+
},
|
|
300
|
+
"coupon": {
|
|
301
|
+
"type": "pushwoosh.passkit.v1.Coupon"
|
|
302
|
+
},
|
|
303
|
+
"eventTicket": {
|
|
304
|
+
"type": "pushwoosh.passkit.v1.EventTicket"
|
|
305
|
+
},
|
|
306
|
+
"storeCard": {
|
|
307
|
+
"type": "pushwoosh.passkit.v1.StoreCard"
|
|
308
|
+
},
|
|
309
|
+
"generic": {
|
|
310
|
+
"type": "pushwoosh.passkit.v1.Generic"
|
|
311
|
+
},
|
|
312
|
+
"backgroundColor": {
|
|
313
|
+
"type": "string"
|
|
314
|
+
},
|
|
315
|
+
"foregroundColor": {
|
|
316
|
+
"type": "string"
|
|
317
|
+
},
|
|
318
|
+
"labelColor": {
|
|
319
|
+
"type": "string"
|
|
320
|
+
},
|
|
321
|
+
"logoText": {
|
|
322
|
+
"type": "string"
|
|
323
|
+
},
|
|
324
|
+
"suppressStripShine": {
|
|
325
|
+
"type": "boolean"
|
|
326
|
+
},
|
|
327
|
+
"barcodes": {
|
|
328
|
+
"type": "pushwoosh.passkit.v1.PassBarcode",
|
|
329
|
+
"array": true
|
|
330
|
+
},
|
|
331
|
+
"locations": {
|
|
332
|
+
"type": "pushwoosh.passkit.v1.PassLocation",
|
|
333
|
+
"array": true
|
|
334
|
+
},
|
|
335
|
+
"beacons": {
|
|
336
|
+
"type": "pushwoosh.passkit.v1.PassBeacon",
|
|
337
|
+
"array": true
|
|
338
|
+
},
|
|
339
|
+
"relevantDate": {
|
|
340
|
+
"type": "string"
|
|
341
|
+
},
|
|
342
|
+
"maxDistance": {
|
|
343
|
+
"type": "number"
|
|
344
|
+
},
|
|
345
|
+
"expirationDate": {
|
|
346
|
+
"type": "string"
|
|
347
|
+
},
|
|
348
|
+
"voided": {
|
|
349
|
+
"type": "boolean"
|
|
350
|
+
},
|
|
351
|
+
"webServiceURL": {
|
|
352
|
+
"type": "string"
|
|
353
|
+
},
|
|
354
|
+
"authenticationToken": {
|
|
355
|
+
"type": "string"
|
|
356
|
+
},
|
|
357
|
+
"groupingIdentifier": {
|
|
358
|
+
"type": "string"
|
|
359
|
+
},
|
|
360
|
+
"userInfo": {
|
|
361
|
+
"type": "string",
|
|
362
|
+
"mapKeyType": "string"
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
"oneofs": {
|
|
366
|
+
"passStructure": {
|
|
367
|
+
"oneof": [
|
|
368
|
+
"boardingPass",
|
|
369
|
+
"coupon",
|
|
370
|
+
"eventTicket",
|
|
371
|
+
"storeCard",
|
|
372
|
+
"generic"
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"pushwoosh.passkit.v1.PassImage": {
|
|
378
|
+
"type": "I",
|
|
379
|
+
"fields": {
|
|
380
|
+
"imageType": {
|
|
381
|
+
"type": "string"
|
|
382
|
+
},
|
|
383
|
+
"data": {
|
|
384
|
+
"type": "string"
|
|
385
|
+
},
|
|
386
|
+
"contentType": {
|
|
387
|
+
"type": "string"
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
"pushwoosh.passkit.v1.ValidatePassRequest": {
|
|
392
|
+
"type": "I",
|
|
393
|
+
"fields": {
|
|
394
|
+
"pass": {
|
|
395
|
+
"type": "pushwoosh.passkit.v1.Pass"
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"pushwoosh.passkit.v1.ValidatePassResponse": {
|
|
400
|
+
"type": "I",
|
|
401
|
+
"fields": {
|
|
402
|
+
"valid": {
|
|
403
|
+
"type": "boolean"
|
|
404
|
+
},
|
|
405
|
+
"errors": {
|
|
406
|
+
"type": "string",
|
|
407
|
+
"array": true
|
|
408
|
+
},
|
|
409
|
+
"warnings": {
|
|
410
|
+
"type": "string",
|
|
411
|
+
"array": true
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"pushwoosh.passkit.v1.CreatePassRequest": {
|
|
416
|
+
"type": "I",
|
|
417
|
+
"fields": {
|
|
418
|
+
"pass": {
|
|
419
|
+
"type": "pushwoosh.passkit.v1.Pass"
|
|
420
|
+
},
|
|
421
|
+
"images": {
|
|
422
|
+
"type": "pushwoosh.passkit.v1.PassImage",
|
|
423
|
+
"array": true
|
|
424
|
+
},
|
|
425
|
+
"userId": {
|
|
426
|
+
"type": "string"
|
|
427
|
+
},
|
|
428
|
+
"applicationCode": {
|
|
429
|
+
"type": "string"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"pushwoosh.passkit.v1.GetConfigRequest": {
|
|
434
|
+
"type": "I",
|
|
435
|
+
"fields": {
|
|
436
|
+
"applicationCode": {
|
|
437
|
+
"type": "string"
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"pushwoosh.passkit.v1.CreatePassResponse": {
|
|
442
|
+
"type": "I",
|
|
443
|
+
"fields": {
|
|
444
|
+
"pkpassData": {
|
|
445
|
+
"type": "string"
|
|
446
|
+
},
|
|
447
|
+
"filename": {
|
|
448
|
+
"type": "string"
|
|
449
|
+
},
|
|
450
|
+
"message": {
|
|
451
|
+
"type": "string"
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
"pushwoosh.passkit.v1.GetConfigResponse": {
|
|
456
|
+
"type": "I",
|
|
457
|
+
"fields": {
|
|
458
|
+
"teamIdentifier": {
|
|
459
|
+
"type": "string"
|
|
460
|
+
},
|
|
461
|
+
"passTypeIdentifier": {
|
|
462
|
+
"type": "string"
|
|
463
|
+
},
|
|
464
|
+
"organizationName": {
|
|
465
|
+
"type": "string"
|
|
466
|
+
},
|
|
467
|
+
"hasCertificate": {
|
|
468
|
+
"type": "boolean"
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
"pushwoosh.passkit.v1.TemplateInfo": {
|
|
473
|
+
"type": "I",
|
|
474
|
+
"fields": {
|
|
475
|
+
"filename": {
|
|
476
|
+
"type": "string"
|
|
477
|
+
},
|
|
478
|
+
"name": {
|
|
479
|
+
"type": "string"
|
|
480
|
+
},
|
|
481
|
+
"description": {
|
|
482
|
+
"type": "string"
|
|
483
|
+
},
|
|
484
|
+
"style": {
|
|
485
|
+
"type": "string"
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
"pushwoosh.passkit.v1.ListTemplatesResponse": {
|
|
490
|
+
"type": "I",
|
|
491
|
+
"fields": {
|
|
492
|
+
"templates": {
|
|
493
|
+
"type": "pushwoosh.passkit.v1.TemplateInfo",
|
|
494
|
+
"array": true
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
"pushwoosh.passkit.v1.GetTemplateRequest": {
|
|
499
|
+
"type": "I",
|
|
500
|
+
"fields": {
|
|
501
|
+
"filename": {
|
|
502
|
+
"type": "string"
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
"pushwoosh.passkit.v1.GetTemplateResponse": {
|
|
507
|
+
"type": "I",
|
|
508
|
+
"fields": {
|
|
509
|
+
"template": {
|
|
510
|
+
"type": "pushwoosh.passkit.v1.Pass"
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
"pushwoosh.passkit.v1.UpdatePassRequest": {
|
|
515
|
+
"type": "I",
|
|
516
|
+
"fields": {
|
|
517
|
+
"serialNumber": {
|
|
518
|
+
"type": "string"
|
|
519
|
+
},
|
|
520
|
+
"updates": {
|
|
521
|
+
"type": "pushwoosh.passkit.v1.Pass"
|
|
522
|
+
},
|
|
523
|
+
"applicationCode": {
|
|
524
|
+
"type": "string"
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
"pushwoosh.passkit.v1.UpdatePassResponse": {
|
|
529
|
+
"type": "I",
|
|
530
|
+
"fields": {
|
|
531
|
+
"success": {
|
|
532
|
+
"type": "boolean"
|
|
533
|
+
},
|
|
534
|
+
"updateTag": {
|
|
535
|
+
"type": "number"
|
|
536
|
+
},
|
|
537
|
+
"message": {
|
|
538
|
+
"type": "string"
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
"pushwoosh.passkit.v1.PassRecord": {
|
|
543
|
+
"type": "I",
|
|
544
|
+
"fields": {
|
|
545
|
+
"serialNumber": {
|
|
546
|
+
"type": "string"
|
|
547
|
+
},
|
|
548
|
+
"passTypeIdentifier": {
|
|
549
|
+
"type": "string"
|
|
550
|
+
},
|
|
551
|
+
"organizationName": {
|
|
552
|
+
"type": "string"
|
|
553
|
+
},
|
|
554
|
+
"description": {
|
|
555
|
+
"type": "string"
|
|
556
|
+
},
|
|
557
|
+
"createdAt": {
|
|
558
|
+
"type": "Date"
|
|
559
|
+
},
|
|
560
|
+
"updatedAt": {
|
|
561
|
+
"type": "Date"
|
|
562
|
+
},
|
|
563
|
+
"updateTag": {
|
|
564
|
+
"type": "number"
|
|
565
|
+
},
|
|
566
|
+
"pass": {
|
|
567
|
+
"type": "pushwoosh.passkit.v1.Pass"
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
"pushwoosh.passkit.v1.ListPassesRequest": {
|
|
572
|
+
"type": "I",
|
|
573
|
+
"fields": {
|
|
574
|
+
"applicationCode": {
|
|
575
|
+
"type": "string"
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
"pushwoosh.passkit.v1.ListPassesResponse": {
|
|
580
|
+
"type": "I",
|
|
581
|
+
"fields": {
|
|
582
|
+
"passes": {
|
|
583
|
+
"type": "pushwoosh.passkit.v1.PassRecord",
|
|
584
|
+
"array": true
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
"pushwoosh.passkit.v1.DeviceRegistration": {
|
|
589
|
+
"type": "I",
|
|
590
|
+
"fields": {
|
|
591
|
+
"deviceLibraryIdentifier": {
|
|
592
|
+
"type": "string"
|
|
593
|
+
},
|
|
594
|
+
"pushToken": {
|
|
595
|
+
"type": "string"
|
|
596
|
+
},
|
|
597
|
+
"registeredAt": {
|
|
598
|
+
"type": "Date"
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
"pushwoosh.passkit.v1.GetPassRegistrationsRequest": {
|
|
603
|
+
"type": "I",
|
|
604
|
+
"fields": {
|
|
605
|
+
"serialNumber": {
|
|
606
|
+
"type": "string"
|
|
607
|
+
},
|
|
608
|
+
"applicationCode": {
|
|
609
|
+
"type": "string"
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
"pushwoosh.passkit.v1.GetPassRegistrationsResponse": {
|
|
614
|
+
"type": "I",
|
|
615
|
+
"fields": {
|
|
616
|
+
"registrations": {
|
|
617
|
+
"type": "pushwoosh.passkit.v1.DeviceRegistration",
|
|
618
|
+
"array": true
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
"pushwoosh.passkit.v1.PassKitWebService": {
|
|
623
|
+
"type": "S",
|
|
624
|
+
"key": "passKitWeb",
|
|
625
|
+
"methods": {
|
|
626
|
+
"RegisterDevice": {
|
|
627
|
+
"request": "pushwoosh.passkit.v1.RegisterDeviceRequest",
|
|
628
|
+
"response": "pushwoosh.passkit.v1.RegisterDeviceResponse",
|
|
629
|
+
"method": "post",
|
|
630
|
+
"path": "/v1/devices/{device_library_identifier}/registrations/{pass_type_identifier}/{serial_number}"
|
|
631
|
+
},
|
|
632
|
+
"GetUpdatablePasses": {
|
|
633
|
+
"request": "pushwoosh.passkit.v1.GetUpdatablePassesRequest",
|
|
634
|
+
"response": "pushwoosh.passkit.v1.GetUpdatablePassesResponse",
|
|
635
|
+
"method": "get",
|
|
636
|
+
"path": "/v1/devices/{device_library_identifier}/registrations/{pass_type_identifier}"
|
|
637
|
+
},
|
|
638
|
+
"GetLatestPass": {
|
|
639
|
+
"request": "pushwoosh.passkit.v1.GetLatestPassRequest",
|
|
640
|
+
"response": "pushwoosh.passkit.v1.GetLatestPassResponse",
|
|
641
|
+
"method": "get",
|
|
642
|
+
"path": "/v1/passes/{pass_type_identifier}/{serial_number}"
|
|
643
|
+
},
|
|
644
|
+
"UnregisterDevice": {
|
|
645
|
+
"request": "pushwoosh.passkit.v1.UnregisterDeviceRequest",
|
|
646
|
+
"response": "{}",
|
|
647
|
+
"method": "delete",
|
|
648
|
+
"path": "/v1/devices/{device_library_identifier}/registrations/{pass_type_identifier}/{serial_number}"
|
|
649
|
+
},
|
|
650
|
+
"LogMessages": {
|
|
651
|
+
"request": "pushwoosh.passkit.v1.LogMessagesRequest",
|
|
652
|
+
"response": "{}",
|
|
653
|
+
"method": "post",
|
|
654
|
+
"path": "/v1/log"
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
"pushwoosh.passkit.v1.RegisterDeviceRequest": {
|
|
659
|
+
"type": "I",
|
|
660
|
+
"fields": {
|
|
661
|
+
"deviceLibraryIdentifier": {
|
|
662
|
+
"type": "string"
|
|
663
|
+
},
|
|
664
|
+
"passTypeIdentifier": {
|
|
665
|
+
"type": "string"
|
|
666
|
+
},
|
|
667
|
+
"serialNumber": {
|
|
668
|
+
"type": "string"
|
|
669
|
+
},
|
|
670
|
+
"pushToken": {
|
|
671
|
+
"type": "string"
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
},
|
|
675
|
+
"pushwoosh.passkit.v1.RegisterDeviceResponse": {
|
|
676
|
+
"type": "I",
|
|
677
|
+
"fields": {
|
|
678
|
+
"statusCode": {
|
|
679
|
+
"type": "number"
|
|
680
|
+
},
|
|
681
|
+
"message": {
|
|
682
|
+
"type": "string"
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
},
|
|
686
|
+
"pushwoosh.passkit.v1.GetUpdatablePassesRequest": {
|
|
687
|
+
"type": "I",
|
|
688
|
+
"fields": {
|
|
689
|
+
"deviceLibraryIdentifier": {
|
|
690
|
+
"type": "string"
|
|
691
|
+
},
|
|
692
|
+
"passTypeIdentifier": {
|
|
693
|
+
"type": "string"
|
|
694
|
+
},
|
|
695
|
+
"passesUpdatedSince": {
|
|
696
|
+
"type": "string"
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
"pushwoosh.passkit.v1.GetUpdatablePassesResponse": {
|
|
701
|
+
"type": "I",
|
|
702
|
+
"fields": {
|
|
703
|
+
"serialNumbers": {
|
|
704
|
+
"type": "string",
|
|
705
|
+
"array": true
|
|
706
|
+
},
|
|
707
|
+
"lastUpdated": {
|
|
708
|
+
"type": "string"
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
"pushwoosh.passkit.v1.GetLatestPassRequest": {
|
|
713
|
+
"type": "I",
|
|
714
|
+
"fields": {
|
|
715
|
+
"passTypeIdentifier": {
|
|
716
|
+
"type": "string"
|
|
717
|
+
},
|
|
718
|
+
"serialNumber": {
|
|
719
|
+
"type": "string"
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
},
|
|
723
|
+
"pushwoosh.passkit.v1.GetLatestPassResponse": {
|
|
724
|
+
"type": "I",
|
|
725
|
+
"fields": {
|
|
726
|
+
"pkpassData": {
|
|
727
|
+
"type": "string"
|
|
728
|
+
},
|
|
729
|
+
"lastModified": {
|
|
730
|
+
"type": "string"
|
|
731
|
+
},
|
|
732
|
+
"statusCode": {
|
|
733
|
+
"type": "number"
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
},
|
|
737
|
+
"pushwoosh.passkit.v1.UnregisterDeviceRequest": {
|
|
738
|
+
"type": "I",
|
|
739
|
+
"fields": {
|
|
740
|
+
"deviceLibraryIdentifier": {
|
|
741
|
+
"type": "string"
|
|
742
|
+
},
|
|
743
|
+
"passTypeIdentifier": {
|
|
744
|
+
"type": "string"
|
|
745
|
+
},
|
|
746
|
+
"serialNumber": {
|
|
747
|
+
"type": "string"
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
"pushwoosh.passkit.v1.LogMessagesRequest": {
|
|
752
|
+
"type": "I",
|
|
753
|
+
"fields": {
|
|
754
|
+
"logs": {
|
|
755
|
+
"type": "string",
|
|
756
|
+
"array": true
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
};
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PassKitService as pushwoosh_passkit_v1_PassKitService } from './pushwoosh_passkit_v1';
|
|
2
|
+
import { PassKitWebService as pushwoosh_passkit_v1_PassKitWebService } from './pushwoosh_passkit_v1';
|
|
3
|
+
export type API = {
|
|
4
|
+
passKit: pushwoosh_passkit_v1_PassKitService;
|
|
5
|
+
passKitWeb: pushwoosh_passkit_v1_PassKitWebService;
|
|
6
|
+
};
|
|
7
|
+
export { data } from './data';
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pushwoosh/rpc-gateway-apple-passkit",
|
|
3
|
+
"version": "0.1.25",
|
|
4
|
+
"description": "Apple PassKit Service api gateway HTTP API Types and Data",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"module": "index.js",
|
|
7
|
+
"types": "index.d.js",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://gitlab.corp.pushwoosh.com/uds/apple-passkit-service"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"RPC",
|
|
15
|
+
"Pushwoosh",
|
|
16
|
+
"API"
|
|
17
|
+
],
|
|
18
|
+
"author": "Pushwoosh"
|
|
19
|
+
}
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import { RpcMethod } from './commonTypes';
|
|
2
|
+
export type PassKitService_ValidatePass = RpcMethod<ValidatePassRequest, ValidatePassResponse>;
|
|
3
|
+
export type PassKitService_CreatePass = RpcMethod<CreatePassRequest, CreatePassResponse>;
|
|
4
|
+
export type PassKitService_GetConfig = RpcMethod<GetConfigRequest, GetConfigResponse>;
|
|
5
|
+
export type PassKitService_ListTemplates = RpcMethod<{}, ListTemplatesResponse>;
|
|
6
|
+
export type PassKitService_GetTemplate = RpcMethod<GetTemplateRequest, GetTemplateResponse>;
|
|
7
|
+
export type PassKitService_UpdatePass = RpcMethod<UpdatePassRequest, UpdatePassResponse>;
|
|
8
|
+
export type PassKitService_ListPasses = RpcMethod<ListPassesRequest, ListPassesResponse>;
|
|
9
|
+
export type PassKitService_GetPassRegistrations = RpcMethod<GetPassRegistrationsRequest, GetPassRegistrationsResponse>;
|
|
10
|
+
/** PassKit Designer Service - Main API for pass creation and management */
|
|
11
|
+
export interface PassKitService {
|
|
12
|
+
/** Validate a pass configuration */
|
|
13
|
+
ValidatePass: PassKitService_ValidatePass;
|
|
14
|
+
/** Create a new pass (.pkpass file) */
|
|
15
|
+
CreatePass: PassKitService_CreatePass;
|
|
16
|
+
/** Get server configuration */
|
|
17
|
+
GetConfig: PassKitService_GetConfig;
|
|
18
|
+
/** List available templates */
|
|
19
|
+
ListTemplates: PassKitService_ListTemplates;
|
|
20
|
+
/** Get a specific template */
|
|
21
|
+
GetTemplate: PassKitService_GetTemplate;
|
|
22
|
+
/** Update an existing pass */
|
|
23
|
+
UpdatePass: PassKitService_UpdatePass;
|
|
24
|
+
/** List all passes */
|
|
25
|
+
ListPasses: PassKitService_ListPasses;
|
|
26
|
+
/** Get registrations for a pass */
|
|
27
|
+
GetPassRegistrations: PassKitService_GetPassRegistrations;
|
|
28
|
+
}
|
|
29
|
+
/** Pass Field - represents a field in the pass */
|
|
30
|
+
export type PassField = {
|
|
31
|
+
key: string;
|
|
32
|
+
label: string;
|
|
33
|
+
/** Can be string or number representation */
|
|
34
|
+
value: string;
|
|
35
|
+
changeMessage: string;
|
|
36
|
+
/** PKTextAlignment */
|
|
37
|
+
textAlignment: string;
|
|
38
|
+
/** PKDateStyle */
|
|
39
|
+
dateStyle: string;
|
|
40
|
+
/** PKDateStyle */
|
|
41
|
+
timeStyle: string;
|
|
42
|
+
isRelative: boolean;
|
|
43
|
+
/** PKNumberStyle */
|
|
44
|
+
numberStyle: string;
|
|
45
|
+
currencyCode: string;
|
|
46
|
+
dataDetectorTypes: string[];
|
|
47
|
+
};
|
|
48
|
+
/** Barcode information */
|
|
49
|
+
export type PassBarcode = {
|
|
50
|
+
/** PKBarcodeFormat */
|
|
51
|
+
format: string;
|
|
52
|
+
message: string;
|
|
53
|
+
messageEncoding: string;
|
|
54
|
+
altText: string;
|
|
55
|
+
};
|
|
56
|
+
/** Location information */
|
|
57
|
+
export type PassLocation = {
|
|
58
|
+
latitude: number;
|
|
59
|
+
longitude: number;
|
|
60
|
+
altitude: number;
|
|
61
|
+
relevantText: string;
|
|
62
|
+
};
|
|
63
|
+
/** Beacon information */
|
|
64
|
+
export type PassBeacon = {
|
|
65
|
+
proximityUuid: string;
|
|
66
|
+
major: number;
|
|
67
|
+
minor: number;
|
|
68
|
+
relevantText: string;
|
|
69
|
+
};
|
|
70
|
+
/** Boarding Pass specific data */
|
|
71
|
+
export type BoardingPass = {
|
|
72
|
+
/** PKTransitType: PKTransitTypeAir, PKTransitTypeTrain, PKTransitTypeBus, PKTransitTypeBoat, PKTransitTypeGeneric */
|
|
73
|
+
transitType: string;
|
|
74
|
+
headerFields: PassField[];
|
|
75
|
+
primaryFields: PassField[];
|
|
76
|
+
secondaryFields: PassField[];
|
|
77
|
+
auxiliaryFields: PassField[];
|
|
78
|
+
backFields: PassField[];
|
|
79
|
+
};
|
|
80
|
+
/** Coupon specific data */
|
|
81
|
+
export type Coupon = {
|
|
82
|
+
headerFields: PassField[];
|
|
83
|
+
primaryFields: PassField[];
|
|
84
|
+
secondaryFields: PassField[];
|
|
85
|
+
auxiliaryFields: PassField[];
|
|
86
|
+
backFields: PassField[];
|
|
87
|
+
};
|
|
88
|
+
/** Event Ticket specific data */
|
|
89
|
+
export type EventTicket = {
|
|
90
|
+
headerFields: PassField[];
|
|
91
|
+
primaryFields: PassField[];
|
|
92
|
+
secondaryFields: PassField[];
|
|
93
|
+
auxiliaryFields: PassField[];
|
|
94
|
+
backFields: PassField[];
|
|
95
|
+
};
|
|
96
|
+
/** Store Card specific data */
|
|
97
|
+
export type StoreCard = {
|
|
98
|
+
headerFields: PassField[];
|
|
99
|
+
primaryFields: PassField[];
|
|
100
|
+
secondaryFields: PassField[];
|
|
101
|
+
auxiliaryFields: PassField[];
|
|
102
|
+
backFields: PassField[];
|
|
103
|
+
};
|
|
104
|
+
/** Generic pass specific data */
|
|
105
|
+
export type Generic = {
|
|
106
|
+
headerFields: PassField[];
|
|
107
|
+
primaryFields: PassField[];
|
|
108
|
+
secondaryFields: PassField[];
|
|
109
|
+
auxiliaryFields: PassField[];
|
|
110
|
+
backFields: PassField[];
|
|
111
|
+
};
|
|
112
|
+
export type Pass_passStructure_boardingPass = {
|
|
113
|
+
type: 'boardingPass';
|
|
114
|
+
data: BoardingPass;
|
|
115
|
+
};
|
|
116
|
+
export type Pass_passStructure_coupon = {
|
|
117
|
+
type: 'coupon';
|
|
118
|
+
data: Coupon;
|
|
119
|
+
};
|
|
120
|
+
export type Pass_passStructure_eventTicket = {
|
|
121
|
+
type: 'eventTicket';
|
|
122
|
+
data: EventTicket;
|
|
123
|
+
};
|
|
124
|
+
export type Pass_passStructure_storeCard = {
|
|
125
|
+
type: 'storeCard';
|
|
126
|
+
data: StoreCard;
|
|
127
|
+
};
|
|
128
|
+
export type Pass_passStructure_generic = {
|
|
129
|
+
type: 'generic';
|
|
130
|
+
data: Generic;
|
|
131
|
+
};
|
|
132
|
+
export type Pass_passStructure = Pass_passStructure_boardingPass | Pass_passStructure_coupon | Pass_passStructure_eventTicket | Pass_passStructure_storeCard | Pass_passStructure_generic;
|
|
133
|
+
/** Complete pass data structure */
|
|
134
|
+
export type Pass = {
|
|
135
|
+
/** Required fields */
|
|
136
|
+
formatVersion: number;
|
|
137
|
+
passTypeIdentifier: string;
|
|
138
|
+
serialNumber: string;
|
|
139
|
+
teamIdentifier: string;
|
|
140
|
+
organizationName: string;
|
|
141
|
+
description: string;
|
|
142
|
+
/** Visual appearance */
|
|
143
|
+
backgroundColor: string;
|
|
144
|
+
foregroundColor: string;
|
|
145
|
+
labelColor: string;
|
|
146
|
+
logoText: string;
|
|
147
|
+
suppressStripShine: boolean;
|
|
148
|
+
/** Barcodes */
|
|
149
|
+
barcodes: PassBarcode[];
|
|
150
|
+
/** Relevance */
|
|
151
|
+
locations: PassLocation[];
|
|
152
|
+
beacons: PassBeacon[];
|
|
153
|
+
/** ISO 8601 */
|
|
154
|
+
relevantDate: string;
|
|
155
|
+
maxDistance: number;
|
|
156
|
+
/** Expiration */
|
|
157
|
+
expirationDate: string;
|
|
158
|
+
voided: boolean;
|
|
159
|
+
/** Web Service */
|
|
160
|
+
webServiceURL: string;
|
|
161
|
+
authenticationToken: string;
|
|
162
|
+
/** Advanced */
|
|
163
|
+
groupingIdentifier: string;
|
|
164
|
+
userInfo: Record<string, string>;
|
|
165
|
+
passStructure: Pass_passStructure;
|
|
166
|
+
};
|
|
167
|
+
/** Image data for pass creation */
|
|
168
|
+
export type PassImage = {
|
|
169
|
+
/** icon, logo, strip, background, footer, thumbnail */
|
|
170
|
+
imageType: string;
|
|
171
|
+
data: string;
|
|
172
|
+
contentType: string;
|
|
173
|
+
};
|
|
174
|
+
/** Validate pass request */
|
|
175
|
+
export type ValidatePassRequest = {
|
|
176
|
+
pass: Pass;
|
|
177
|
+
};
|
|
178
|
+
/** Validate pass response */
|
|
179
|
+
export type ValidatePassResponse = {
|
|
180
|
+
valid: boolean;
|
|
181
|
+
errors: string[];
|
|
182
|
+
warnings: string[];
|
|
183
|
+
};
|
|
184
|
+
/** Create pass request */
|
|
185
|
+
export type CreatePassRequest = {
|
|
186
|
+
pass: Pass;
|
|
187
|
+
images: PassImage[];
|
|
188
|
+
userId: string;
|
|
189
|
+
applicationCode: string;
|
|
190
|
+
};
|
|
191
|
+
/** Get config request */
|
|
192
|
+
export type GetConfigRequest = {
|
|
193
|
+
applicationCode: string;
|
|
194
|
+
};
|
|
195
|
+
/** Create pass response */
|
|
196
|
+
export type CreatePassResponse = {
|
|
197
|
+
pkpassData: string;
|
|
198
|
+
filename: string;
|
|
199
|
+
message: string;
|
|
200
|
+
};
|
|
201
|
+
/** Get config response */
|
|
202
|
+
export type GetConfigResponse = {
|
|
203
|
+
teamIdentifier: string;
|
|
204
|
+
passTypeIdentifier: string;
|
|
205
|
+
organizationName: string;
|
|
206
|
+
hasCertificate: boolean;
|
|
207
|
+
};
|
|
208
|
+
/** Template info */
|
|
209
|
+
export type TemplateInfo = {
|
|
210
|
+
filename: string;
|
|
211
|
+
name: string;
|
|
212
|
+
description: string;
|
|
213
|
+
style: string;
|
|
214
|
+
};
|
|
215
|
+
/** List templates response */
|
|
216
|
+
export type ListTemplatesResponse = {
|
|
217
|
+
templates: TemplateInfo[];
|
|
218
|
+
};
|
|
219
|
+
/** Get template request */
|
|
220
|
+
export type GetTemplateRequest = {
|
|
221
|
+
filename: string;
|
|
222
|
+
};
|
|
223
|
+
/** Get template response */
|
|
224
|
+
export type GetTemplateResponse = {
|
|
225
|
+
template: Pass;
|
|
226
|
+
};
|
|
227
|
+
/** Update pass request */
|
|
228
|
+
export type UpdatePassRequest = {
|
|
229
|
+
serialNumber: string;
|
|
230
|
+
updates: Pass;
|
|
231
|
+
applicationCode: string;
|
|
232
|
+
};
|
|
233
|
+
/** Update pass response */
|
|
234
|
+
export type UpdatePassResponse = {
|
|
235
|
+
success: boolean;
|
|
236
|
+
updateTag: number;
|
|
237
|
+
message: string;
|
|
238
|
+
};
|
|
239
|
+
/** Pass record for listing */
|
|
240
|
+
export type PassRecord = {
|
|
241
|
+
serialNumber: string;
|
|
242
|
+
passTypeIdentifier: string;
|
|
243
|
+
organizationName: string;
|
|
244
|
+
description: string;
|
|
245
|
+
createdAt: Date;
|
|
246
|
+
updatedAt: Date;
|
|
247
|
+
updateTag: number;
|
|
248
|
+
/** Full pass structure for updates */
|
|
249
|
+
pass: Pass;
|
|
250
|
+
};
|
|
251
|
+
/** List passes request */
|
|
252
|
+
export type ListPassesRequest = {
|
|
253
|
+
applicationCode: string;
|
|
254
|
+
};
|
|
255
|
+
/** List passes response */
|
|
256
|
+
export type ListPassesResponse = {
|
|
257
|
+
passes: PassRecord[];
|
|
258
|
+
};
|
|
259
|
+
/** Device registration info */
|
|
260
|
+
export type DeviceRegistration = {
|
|
261
|
+
deviceLibraryIdentifier: string;
|
|
262
|
+
pushToken: string;
|
|
263
|
+
registeredAt: Date;
|
|
264
|
+
};
|
|
265
|
+
/** Get pass registrations request */
|
|
266
|
+
export type GetPassRegistrationsRequest = {
|
|
267
|
+
serialNumber: string;
|
|
268
|
+
applicationCode: string;
|
|
269
|
+
};
|
|
270
|
+
/** Get pass registrations response */
|
|
271
|
+
export type GetPassRegistrationsResponse = {
|
|
272
|
+
registrations: DeviceRegistration[];
|
|
273
|
+
};
|
|
274
|
+
export type PassKitWebService_RegisterDevice = RpcMethod<RegisterDeviceRequest, RegisterDeviceResponse>;
|
|
275
|
+
export type PassKitWebService_GetUpdatablePasses = RpcMethod<GetUpdatablePassesRequest, GetUpdatablePassesResponse>;
|
|
276
|
+
export type PassKitWebService_GetLatestPass = RpcMethod<GetLatestPassRequest, GetLatestPassResponse>;
|
|
277
|
+
export type PassKitWebService_UnregisterDevice = RpcMethod<UnregisterDeviceRequest, {}>;
|
|
278
|
+
export type PassKitWebService_LogMessages = RpcMethod<LogMessagesRequest, {}>;
|
|
279
|
+
/**
|
|
280
|
+
* PassKit Web Service - Apple's standard endpoints for device registration
|
|
281
|
+
* See: https://developer.apple.com/library/archive/documentation/PassKit/Reference/PassKit_WebService/WebService.html
|
|
282
|
+
*/
|
|
283
|
+
export interface PassKitWebService {
|
|
284
|
+
/** Register a device to receive push notifications for a pass */
|
|
285
|
+
RegisterDevice: PassKitWebService_RegisterDevice;
|
|
286
|
+
/** Get list of serial numbers for passes that have changed */
|
|
287
|
+
GetUpdatablePasses: PassKitWebService_GetUpdatablePasses;
|
|
288
|
+
/** Get the latest version of a pass */
|
|
289
|
+
GetLatestPass: PassKitWebService_GetLatestPass;
|
|
290
|
+
/** Unregister a device */
|
|
291
|
+
UnregisterDevice: PassKitWebService_UnregisterDevice;
|
|
292
|
+
/** Log messages from devices (for debugging) */
|
|
293
|
+
LogMessages: PassKitWebService_LogMessages;
|
|
294
|
+
}
|
|
295
|
+
/** Register device request */
|
|
296
|
+
export type RegisterDeviceRequest = {
|
|
297
|
+
deviceLibraryIdentifier: string;
|
|
298
|
+
passTypeIdentifier: string;
|
|
299
|
+
serialNumber: string;
|
|
300
|
+
pushToken: string;
|
|
301
|
+
};
|
|
302
|
+
/** Register device response */
|
|
303
|
+
export type RegisterDeviceResponse = {
|
|
304
|
+
/** 200 or 201 */
|
|
305
|
+
statusCode: number;
|
|
306
|
+
message: string;
|
|
307
|
+
};
|
|
308
|
+
/** Get updatable passes request */
|
|
309
|
+
export type GetUpdatablePassesRequest = {
|
|
310
|
+
deviceLibraryIdentifier: string;
|
|
311
|
+
passTypeIdentifier: string;
|
|
312
|
+
/** Optional tag */
|
|
313
|
+
passesUpdatedSince: string;
|
|
314
|
+
};
|
|
315
|
+
/** Get updatable passes response */
|
|
316
|
+
export type GetUpdatablePassesResponse = {
|
|
317
|
+
serialNumbers: string[];
|
|
318
|
+
lastUpdated: string;
|
|
319
|
+
};
|
|
320
|
+
/** Get latest pass request */
|
|
321
|
+
export type GetLatestPassRequest = {
|
|
322
|
+
passTypeIdentifier: string;
|
|
323
|
+
serialNumber: string;
|
|
324
|
+
};
|
|
325
|
+
/** Get latest pass response */
|
|
326
|
+
export type GetLatestPassResponse = {
|
|
327
|
+
pkpassData: string;
|
|
328
|
+
/** HTTP header value */
|
|
329
|
+
lastModified: string;
|
|
330
|
+
/** 200, 304 (not modified), or 404 */
|
|
331
|
+
statusCode: number;
|
|
332
|
+
};
|
|
333
|
+
/** Unregister device request */
|
|
334
|
+
export type UnregisterDeviceRequest = {
|
|
335
|
+
deviceLibraryIdentifier: string;
|
|
336
|
+
passTypeIdentifier: string;
|
|
337
|
+
serialNumber: string;
|
|
338
|
+
};
|
|
339
|
+
/** Log messages request */
|
|
340
|
+
export type LogMessagesRequest = {
|
|
341
|
+
logs: string[];
|
|
342
|
+
};
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export type TypeDefinition = InterfaceDefinition | EnumDefinition | ServiceDefinition;
|
|
2
|
+
export type InterfaceDefinition = {
|
|
3
|
+
type: 'I';
|
|
4
|
+
fields: {
|
|
5
|
+
[fieldName: string]: FieldDefinition;
|
|
6
|
+
};
|
|
7
|
+
oneofs?: {
|
|
8
|
+
[oneofName: string]: OneofGroup;
|
|
9
|
+
};
|
|
10
|
+
comment?: string;
|
|
11
|
+
};
|
|
12
|
+
export type FieldDefinition = {
|
|
13
|
+
type: string;
|
|
14
|
+
mapKeyType?: string;
|
|
15
|
+
array?: boolean;
|
|
16
|
+
optional?: boolean;
|
|
17
|
+
comment?: string;
|
|
18
|
+
};
|
|
19
|
+
export type OneofGroup = {
|
|
20
|
+
oneof: string[];
|
|
21
|
+
};
|
|
22
|
+
export type EnumDefinition = {
|
|
23
|
+
type: 'E';
|
|
24
|
+
values: string[];
|
|
25
|
+
valuesArgs?: Record<string, string[]>;
|
|
26
|
+
comment?: string;
|
|
27
|
+
valueComments?: Record<string, string>;
|
|
28
|
+
};
|
|
29
|
+
export type ServiceDefinition = {
|
|
30
|
+
type: 'S';
|
|
31
|
+
key: string;
|
|
32
|
+
methods: {
|
|
33
|
+
[methodName: string]: ServiceMethod;
|
|
34
|
+
};
|
|
35
|
+
comment?: string;
|
|
36
|
+
};
|
|
37
|
+
export type ServiceMethod = {
|
|
38
|
+
request: string;
|
|
39
|
+
response: string;
|
|
40
|
+
method: string;
|
|
41
|
+
path: string;
|
|
42
|
+
serverStreaming?: boolean;
|
|
43
|
+
errors?: {
|
|
44
|
+
fieldViolations?: string;
|
|
45
|
+
failedPreconditions?: string;
|
|
46
|
+
commonFailedPreconditions?: string;
|
|
47
|
+
};
|
|
48
|
+
comment?: string;
|
|
49
|
+
};
|
|
50
|
+
export type InterfaceDefinitionRaw = InterfaceDefinition & {
|
|
51
|
+
package: string;
|
|
52
|
+
};
|
|
53
|
+
export type EnumDefinitionRaw = EnumDefinition & {
|
|
54
|
+
package: string;
|
|
55
|
+
};
|
|
56
|
+
export type ServiceDefinitionRaw = ServiceDefinition & {
|
|
57
|
+
package: string;
|
|
58
|
+
};
|
|
59
|
+
export type TypeDefinitionRaw = InterfaceDefinitionRaw | EnumDefinitionRaw | ServiceDefinitionRaw;
|
package/types.js
ADDED