@maxim_mazurok/gapi.client.walletobjects-v1 0.0.20231129

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.
Files changed (3) hide show
  1. package/index.d.ts +6739 -0
  2. package/package.json +20 -0
  3. package/readme.md +598 -0
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.walletobjects-v1",
3
+ "version": "0.0.20231129",
4
+ "description": "TypeScript typings for Google Wallet API v1",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
8
+ },
9
+ "license": "MIT",
10
+ "author": {
11
+ "name": "Maxim Mazurok",
12
+ "email": "maxim@mazurok.com",
13
+ "url": "https://maxim.mazurok.com"
14
+ },
15
+ "types": "index.d.ts",
16
+ "dependencies": {
17
+ "@types/gapi.client": "*",
18
+ "@types/gapi.client.discovery-v1": "*"
19
+ }
20
+ }
package/readme.md ADDED
@@ -0,0 +1,598 @@
1
+ # TypeScript typings for Google Wallet API v1
2
+
3
+ API for issuers to save and manage Google Wallet Objects.
4
+ For detailed description please check [documentation](https://developers.google.com/pay/passes).
5
+
6
+ ## Installing
7
+
8
+ Install typings for Google Wallet API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.walletobjects-v1 --save-dev
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ You need to initialize Google API client in your code:
17
+
18
+ ```typescript
19
+ gapi.load('client', () => {
20
+ // now we can use gapi.client
21
+ // ...
22
+ });
23
+ ```
24
+
25
+ Then load api client wrapper:
26
+
27
+ ```typescript
28
+ gapi.client.load(
29
+ 'https://walletobjects.googleapis.com/$discovery/rest?version=v1',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.walletobjects
33
+ }
34
+ );
35
+ ```
36
+
37
+ ```typescript
38
+ // Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
39
+ gapi.client.load('walletobjects', 'v1', () => {
40
+ // now we can use:
41
+ // gapi.client.walletobjects
42
+ });
43
+ ```
44
+
45
+ Don't forget to authenticate your client before sending any request to resources:
46
+
47
+ ```typescript
48
+ // declare client_id registered in Google Developers Console
49
+ var client_id = '',
50
+ scope = [
51
+ // Private Service: https://www.googleapis.com/auth/wallet_object.issuer
52
+ 'https://www.googleapis.com/auth/wallet_object.issuer',
53
+ ],
54
+ immediate = true;
55
+ // ...
56
+
57
+ gapi.auth.authorize(
58
+ {client_id: client_id, scope: scope, immediate: immediate},
59
+ authResult => {
60
+ if (authResult && !authResult.error) {
61
+ /* handle successful authorization */
62
+ } else {
63
+ /* handle authorization error */
64
+ }
65
+ }
66
+ );
67
+ ```
68
+
69
+ After that you can use Google Wallet API resources: <!-- TODO: make this work for multiple namespaces -->
70
+
71
+ ```typescript
72
+ /*
73
+ Adds a message to the event ticket class referenced by the given class ID.
74
+ */
75
+ await gapi.client.walletobjects.eventticketclass.addmessage({
76
+ resourceId: 'resourceId',
77
+ });
78
+
79
+ /*
80
+ Returns the event ticket class with the given class ID.
81
+ */
82
+ await gapi.client.walletobjects.eventticketclass.get({
83
+ resourceId: 'resourceId',
84
+ });
85
+
86
+ /*
87
+ Inserts an event ticket class with the given ID and properties.
88
+ */
89
+ await gapi.client.walletobjects.eventticketclass.insert({});
90
+
91
+ /*
92
+ Returns a list of all event ticket classes for a given issuer ID.
93
+ */
94
+ await gapi.client.walletobjects.eventticketclass.list({});
95
+
96
+ /*
97
+ Updates the event ticket class referenced by the given class ID. This method supports patch semantics.
98
+ */
99
+ await gapi.client.walletobjects.eventticketclass.patch({
100
+ resourceId: 'resourceId',
101
+ });
102
+
103
+ /*
104
+ Updates the event ticket class referenced by the given class ID.
105
+ */
106
+ await gapi.client.walletobjects.eventticketclass.update({
107
+ resourceId: 'resourceId',
108
+ });
109
+
110
+ /*
111
+ Adds a message to the event ticket object referenced by the given object ID.
112
+ */
113
+ await gapi.client.walletobjects.eventticketobject.addmessage({
114
+ resourceId: 'resourceId',
115
+ });
116
+
117
+ /*
118
+ Returns the event ticket object with the given object ID.
119
+ */
120
+ await gapi.client.walletobjects.eventticketobject.get({
121
+ resourceId: 'resourceId',
122
+ });
123
+
124
+ /*
125
+ Inserts an event ticket object with the given ID and properties.
126
+ */
127
+ await gapi.client.walletobjects.eventticketobject.insert({});
128
+
129
+ /*
130
+ Returns a list of all event ticket objects for a given issuer ID.
131
+ */
132
+ await gapi.client.walletobjects.eventticketobject.list({});
133
+
134
+ /*
135
+ Modifies linked offer objects for the event ticket object with the given ID.
136
+ */
137
+ await gapi.client.walletobjects.eventticketobject.modifylinkedofferobjects({
138
+ resourceId: 'resourceId',
139
+ });
140
+
141
+ /*
142
+ Updates the event ticket object referenced by the given object ID. This method supports patch semantics.
143
+ */
144
+ await gapi.client.walletobjects.eventticketobject.patch({
145
+ resourceId: 'resourceId',
146
+ });
147
+
148
+ /*
149
+ Updates the event ticket object referenced by the given object ID.
150
+ */
151
+ await gapi.client.walletobjects.eventticketobject.update({
152
+ resourceId: 'resourceId',
153
+ });
154
+
155
+ /*
156
+ Adds a message to the flight class referenced by the given class ID.
157
+ */
158
+ await gapi.client.walletobjects.flightclass.addmessage({
159
+ resourceId: 'resourceId',
160
+ });
161
+
162
+ /*
163
+ Returns the flight class with the given class ID.
164
+ */
165
+ await gapi.client.walletobjects.flightclass.get({resourceId: 'resourceId'});
166
+
167
+ /*
168
+ Inserts an flight class with the given ID and properties.
169
+ */
170
+ await gapi.client.walletobjects.flightclass.insert({});
171
+
172
+ /*
173
+ Returns a list of all flight classes for a given issuer ID.
174
+ */
175
+ await gapi.client.walletobjects.flightclass.list({});
176
+
177
+ /*
178
+ Updates the flight class referenced by the given class ID. This method supports patch semantics.
179
+ */
180
+ await gapi.client.walletobjects.flightclass.patch({resourceId: 'resourceId'});
181
+
182
+ /*
183
+ Updates the flight class referenced by the given class ID.
184
+ */
185
+ await gapi.client.walletobjects.flightclass.update({resourceId: 'resourceId'});
186
+
187
+ /*
188
+ Adds a message to the flight object referenced by the given object ID.
189
+ */
190
+ await gapi.client.walletobjects.flightobject.addmessage({
191
+ resourceId: 'resourceId',
192
+ });
193
+
194
+ /*
195
+ Returns the flight object with the given object ID.
196
+ */
197
+ await gapi.client.walletobjects.flightobject.get({resourceId: 'resourceId'});
198
+
199
+ /*
200
+ Inserts an flight object with the given ID and properties.
201
+ */
202
+ await gapi.client.walletobjects.flightobject.insert({});
203
+
204
+ /*
205
+ Returns a list of all flight objects for a given issuer ID.
206
+ */
207
+ await gapi.client.walletobjects.flightobject.list({});
208
+
209
+ /*
210
+ Updates the flight object referenced by the given object ID. This method supports patch semantics.
211
+ */
212
+ await gapi.client.walletobjects.flightobject.patch({resourceId: 'resourceId'});
213
+
214
+ /*
215
+ Updates the flight object referenced by the given object ID.
216
+ */
217
+ await gapi.client.walletobjects.flightobject.update({resourceId: 'resourceId'});
218
+
219
+ /*
220
+ Returns the generic class with the given class ID.
221
+ */
222
+ await gapi.client.walletobjects.genericclass.get({resourceId: 'resourceId'});
223
+
224
+ /*
225
+ Inserts a generic class with the given ID and properties.
226
+ */
227
+ await gapi.client.walletobjects.genericclass.insert({});
228
+
229
+ /*
230
+ Returns a list of all generic classes for a given issuer ID.
231
+ */
232
+ await gapi.client.walletobjects.genericclass.list({});
233
+
234
+ /*
235
+ Updates the generic class referenced by the given class ID. This method supports patch semantics.
236
+ */
237
+ await gapi.client.walletobjects.genericclass.patch({resourceId: 'resourceId'});
238
+
239
+ /*
240
+ Updates the Generic class referenced by the given class ID.
241
+ */
242
+ await gapi.client.walletobjects.genericclass.update({resourceId: 'resourceId'});
243
+
244
+ /*
245
+ Returns the generic object with the given object ID.
246
+ */
247
+ await gapi.client.walletobjects.genericobject.get({resourceId: 'resourceId'});
248
+
249
+ /*
250
+ Inserts a generic object with the given ID and properties.
251
+ */
252
+ await gapi.client.walletobjects.genericobject.insert({});
253
+
254
+ /*
255
+ Returns a list of all generic objects for a given issuer ID.
256
+ */
257
+ await gapi.client.walletobjects.genericobject.list({});
258
+
259
+ /*
260
+ Updates the generic object referenced by the given object ID. This method supports patch semantics.
261
+ */
262
+ await gapi.client.walletobjects.genericobject.patch({resourceId: 'resourceId'});
263
+
264
+ /*
265
+ Updates the generic object referenced by the given object ID.
266
+ */
267
+ await gapi.client.walletobjects.genericobject.update({
268
+ resourceId: 'resourceId',
269
+ });
270
+
271
+ /*
272
+ Adds a message to the gift card class referenced by the given class ID.
273
+ */
274
+ await gapi.client.walletobjects.giftcardclass.addmessage({
275
+ resourceId: 'resourceId',
276
+ });
277
+
278
+ /*
279
+ Returns the gift card class with the given class ID.
280
+ */
281
+ await gapi.client.walletobjects.giftcardclass.get({resourceId: 'resourceId'});
282
+
283
+ /*
284
+ Inserts an gift card class with the given ID and properties.
285
+ */
286
+ await gapi.client.walletobjects.giftcardclass.insert({});
287
+
288
+ /*
289
+ Returns a list of all gift card classes for a given issuer ID.
290
+ */
291
+ await gapi.client.walletobjects.giftcardclass.list({});
292
+
293
+ /*
294
+ Updates the gift card class referenced by the given class ID. This method supports patch semantics.
295
+ */
296
+ await gapi.client.walletobjects.giftcardclass.patch({resourceId: 'resourceId'});
297
+
298
+ /*
299
+ Updates the gift card class referenced by the given class ID.
300
+ */
301
+ await gapi.client.walletobjects.giftcardclass.update({
302
+ resourceId: 'resourceId',
303
+ });
304
+
305
+ /*
306
+ Adds a message to the gift card object referenced by the given object ID.
307
+ */
308
+ await gapi.client.walletobjects.giftcardobject.addmessage({
309
+ resourceId: 'resourceId',
310
+ });
311
+
312
+ /*
313
+ Returns the gift card object with the given object ID.
314
+ */
315
+ await gapi.client.walletobjects.giftcardobject.get({resourceId: 'resourceId'});
316
+
317
+ /*
318
+ Inserts an gift card object with the given ID and properties.
319
+ */
320
+ await gapi.client.walletobjects.giftcardobject.insert({});
321
+
322
+ /*
323
+ Returns a list of all gift card objects for a given issuer ID.
324
+ */
325
+ await gapi.client.walletobjects.giftcardobject.list({});
326
+
327
+ /*
328
+ Updates the gift card object referenced by the given object ID. This method supports patch semantics.
329
+ */
330
+ await gapi.client.walletobjects.giftcardobject.patch({
331
+ resourceId: 'resourceId',
332
+ });
333
+
334
+ /*
335
+ Updates the gift card object referenced by the given object ID.
336
+ */
337
+ await gapi.client.walletobjects.giftcardobject.update({
338
+ resourceId: 'resourceId',
339
+ });
340
+
341
+ /*
342
+ Returns the issuer with the given issuer ID.
343
+ */
344
+ await gapi.client.walletobjects.issuer.get({resourceId: 'resourceId'});
345
+
346
+ /*
347
+ Inserts an issuer with the given ID and properties.
348
+ */
349
+ await gapi.client.walletobjects.issuer.insert({});
350
+
351
+ /*
352
+ Returns a list of all issuers shared to the caller.
353
+ */
354
+ await gapi.client.walletobjects.issuer.list({});
355
+
356
+ /*
357
+ Updates the issuer referenced by the given issuer ID. This method supports patch semantics.
358
+ */
359
+ await gapi.client.walletobjects.issuer.patch({resourceId: 'resourceId'});
360
+
361
+ /*
362
+ Updates the issuer referenced by the given issuer ID.
363
+ */
364
+ await gapi.client.walletobjects.issuer.update({resourceId: 'resourceId'});
365
+
366
+ /*
367
+ Inserts the resources in the JWT.
368
+ */
369
+ await gapi.client.walletobjects.jwt.insert({});
370
+
371
+ /*
372
+ Adds a message to the loyalty class referenced by the given class ID.
373
+ */
374
+ await gapi.client.walletobjects.loyaltyclass.addmessage({
375
+ resourceId: 'resourceId',
376
+ });
377
+
378
+ /*
379
+ Returns the loyalty class with the given class ID.
380
+ */
381
+ await gapi.client.walletobjects.loyaltyclass.get({resourceId: 'resourceId'});
382
+
383
+ /*
384
+ Inserts an loyalty class with the given ID and properties.
385
+ */
386
+ await gapi.client.walletobjects.loyaltyclass.insert({});
387
+
388
+ /*
389
+ Returns a list of all loyalty classes for a given issuer ID.
390
+ */
391
+ await gapi.client.walletobjects.loyaltyclass.list({});
392
+
393
+ /*
394
+ Updates the loyalty class referenced by the given class ID. This method supports patch semantics.
395
+ */
396
+ await gapi.client.walletobjects.loyaltyclass.patch({resourceId: 'resourceId'});
397
+
398
+ /*
399
+ Updates the loyalty class referenced by the given class ID.
400
+ */
401
+ await gapi.client.walletobjects.loyaltyclass.update({resourceId: 'resourceId'});
402
+
403
+ /*
404
+ Adds a message to the loyalty object referenced by the given object ID.
405
+ */
406
+ await gapi.client.walletobjects.loyaltyobject.addmessage({
407
+ resourceId: 'resourceId',
408
+ });
409
+
410
+ /*
411
+ Returns the loyalty object with the given object ID.
412
+ */
413
+ await gapi.client.walletobjects.loyaltyobject.get({resourceId: 'resourceId'});
414
+
415
+ /*
416
+ Inserts an loyalty object with the given ID and properties.
417
+ */
418
+ await gapi.client.walletobjects.loyaltyobject.insert({});
419
+
420
+ /*
421
+ Returns a list of all loyalty objects for a given issuer ID.
422
+ */
423
+ await gapi.client.walletobjects.loyaltyobject.list({});
424
+
425
+ /*
426
+ Modifies linked offer objects for the loyalty object with the given ID.
427
+ */
428
+ await gapi.client.walletobjects.loyaltyobject.modifylinkedofferobjects({
429
+ resourceId: 'resourceId',
430
+ });
431
+
432
+ /*
433
+ Updates the loyalty object referenced by the given object ID. This method supports patch semantics.
434
+ */
435
+ await gapi.client.walletobjects.loyaltyobject.patch({resourceId: 'resourceId'});
436
+
437
+ /*
438
+ Updates the loyalty object referenced by the given object ID.
439
+ */
440
+ await gapi.client.walletobjects.loyaltyobject.update({
441
+ resourceId: 'resourceId',
442
+ });
443
+
444
+ /*
445
+ Downloads rotating barcode values for the transit object referenced by the given object ID.
446
+ */
447
+ await gapi.client.walletobjects.media.download({resourceId: 'resourceId'});
448
+
449
+ /*
450
+ Uploads rotating barcode values for the transit object referenced by the given object ID. Note the max upload size is specified in google3/production/config/cdd/apps-upload/customers/payments-consumer-passes/config.gcl and enforced by Scotty.
451
+ */
452
+ await gapi.client.walletobjects.media.upload({resourceId: 'resourceId'});
453
+
454
+ /*
455
+ Adds a message to the offer class referenced by the given class ID.
456
+ */
457
+ await gapi.client.walletobjects.offerclass.addmessage({
458
+ resourceId: 'resourceId',
459
+ });
460
+
461
+ /*
462
+ Returns the offer class with the given class ID.
463
+ */
464
+ await gapi.client.walletobjects.offerclass.get({resourceId: 'resourceId'});
465
+
466
+ /*
467
+ Inserts an offer class with the given ID and properties.
468
+ */
469
+ await gapi.client.walletobjects.offerclass.insert({});
470
+
471
+ /*
472
+ Returns a list of all offer classes for a given issuer ID.
473
+ */
474
+ await gapi.client.walletobjects.offerclass.list({});
475
+
476
+ /*
477
+ Updates the offer class referenced by the given class ID. This method supports patch semantics.
478
+ */
479
+ await gapi.client.walletobjects.offerclass.patch({resourceId: 'resourceId'});
480
+
481
+ /*
482
+ Updates the offer class referenced by the given class ID.
483
+ */
484
+ await gapi.client.walletobjects.offerclass.update({resourceId: 'resourceId'});
485
+
486
+ /*
487
+ Adds a message to the offer object referenced by the given object ID.
488
+ */
489
+ await gapi.client.walletobjects.offerobject.addmessage({
490
+ resourceId: 'resourceId',
491
+ });
492
+
493
+ /*
494
+ Returns the offer object with the given object ID.
495
+ */
496
+ await gapi.client.walletobjects.offerobject.get({resourceId: 'resourceId'});
497
+
498
+ /*
499
+ Inserts an offer object with the given ID and properties.
500
+ */
501
+ await gapi.client.walletobjects.offerobject.insert({});
502
+
503
+ /*
504
+ Returns a list of all offer objects for a given issuer ID.
505
+ */
506
+ await gapi.client.walletobjects.offerobject.list({});
507
+
508
+ /*
509
+ Updates the offer object referenced by the given object ID. This method supports patch semantics.
510
+ */
511
+ await gapi.client.walletobjects.offerobject.patch({resourceId: 'resourceId'});
512
+
513
+ /*
514
+ Updates the offer object referenced by the given object ID.
515
+ */
516
+ await gapi.client.walletobjects.offerobject.update({resourceId: 'resourceId'});
517
+
518
+ /*
519
+ Returns the permissions for the given issuer id.
520
+ */
521
+ await gapi.client.walletobjects.permissions.get({resourceId: 'resourceId'});
522
+
523
+ /*
524
+ Updates the permissions for the given issuer.
525
+ */
526
+ await gapi.client.walletobjects.permissions.update({resourceId: 'resourceId'});
527
+
528
+ /*
529
+ Inserts the smart tap.
530
+ */
531
+ await gapi.client.walletobjects.smarttap.insert({});
532
+
533
+ /*
534
+ Adds a message to the transit class referenced by the given class ID.
535
+ */
536
+ await gapi.client.walletobjects.transitclass.addmessage({
537
+ resourceId: 'resourceId',
538
+ });
539
+
540
+ /*
541
+ Returns the transit class with the given class ID.
542
+ */
543
+ await gapi.client.walletobjects.transitclass.get({resourceId: 'resourceId'});
544
+
545
+ /*
546
+ Inserts a transit class with the given ID and properties.
547
+ */
548
+ await gapi.client.walletobjects.transitclass.insert({});
549
+
550
+ /*
551
+ Returns a list of all transit classes for a given issuer ID.
552
+ */
553
+ await gapi.client.walletobjects.transitclass.list({});
554
+
555
+ /*
556
+ Updates the transit class referenced by the given class ID. This method supports patch semantics.
557
+ */
558
+ await gapi.client.walletobjects.transitclass.patch({resourceId: 'resourceId'});
559
+
560
+ /*
561
+ Updates the transit class referenced by the given class ID.
562
+ */
563
+ await gapi.client.walletobjects.transitclass.update({resourceId: 'resourceId'});
564
+
565
+ /*
566
+ Adds a message to the transit object referenced by the given object ID.
567
+ */
568
+ await gapi.client.walletobjects.transitobject.addmessage({
569
+ resourceId: 'resourceId',
570
+ });
571
+
572
+ /*
573
+ Returns the transit object with the given object ID.
574
+ */
575
+ await gapi.client.walletobjects.transitobject.get({resourceId: 'resourceId'});
576
+
577
+ /*
578
+ Inserts an transit object with the given ID and properties.
579
+ */
580
+ await gapi.client.walletobjects.transitobject.insert({});
581
+
582
+ /*
583
+ Returns a list of all transit objects for a given issuer ID.
584
+ */
585
+ await gapi.client.walletobjects.transitobject.list({});
586
+
587
+ /*
588
+ Updates the transit object referenced by the given object ID. This method supports patch semantics.
589
+ */
590
+ await gapi.client.walletobjects.transitobject.patch({resourceId: 'resourceId'});
591
+
592
+ /*
593
+ Updates the transit object referenced by the given object ID.
594
+ */
595
+ await gapi.client.walletobjects.transitobject.update({
596
+ resourceId: 'resourceId',
597
+ });
598
+ ```