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

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,239 @@
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
+ }
39
+ },
40
+ "pushwoosh.googlewallet.v1.GoogleTextModule": {
41
+ "type": "I",
42
+ "fields": {
43
+ "id": {
44
+ "type": "string"
45
+ },
46
+ "header": {
47
+ "type": "string"
48
+ },
49
+ "body": {
50
+ "type": "string"
51
+ }
52
+ }
53
+ },
54
+ "pushwoosh.googlewallet.v1.GoogleLinkModule": {
55
+ "type": "I",
56
+ "fields": {
57
+ "uri": {
58
+ "type": "string"
59
+ },
60
+ "description": {
61
+ "type": "string"
62
+ }
63
+ }
64
+ },
65
+ "pushwoosh.googlewallet.v1.GoogleBarcode": {
66
+ "type": "I",
67
+ "fields": {
68
+ "format": {
69
+ "type": "string"
70
+ },
71
+ "value": {
72
+ "type": "string"
73
+ },
74
+ "altText": {
75
+ "type": "string"
76
+ }
77
+ }
78
+ },
79
+ "pushwoosh.googlewallet.v1.GooglePass": {
80
+ "type": "I",
81
+ "fields": {
82
+ "serialNumber": {
83
+ "type": "string"
84
+ },
85
+ "cardTitle": {
86
+ "type": "string"
87
+ },
88
+ "header": {
89
+ "type": "string"
90
+ },
91
+ "subheader": {
92
+ "type": "string"
93
+ },
94
+ "hexBackgroundColor": {
95
+ "type": "string"
96
+ },
97
+ "logoUrl": {
98
+ "type": "string"
99
+ },
100
+ "heroImageUrl": {
101
+ "type": "string"
102
+ },
103
+ "barcode": {
104
+ "type": "pushwoosh.googlewallet.v1.GoogleBarcode"
105
+ },
106
+ "textModules": {
107
+ "type": "pushwoosh.googlewallet.v1.GoogleTextModule",
108
+ "array": true
109
+ },
110
+ "links": {
111
+ "type": "pushwoosh.googlewallet.v1.GoogleLinkModule",
112
+ "array": true
113
+ }
114
+ }
115
+ },
116
+ "pushwoosh.googlewallet.v1.GetConfigRequest": {
117
+ "type": "I",
118
+ "fields": {
119
+ "applicationCode": {
120
+ "type": "string"
121
+ }
122
+ }
123
+ },
124
+ "pushwoosh.googlewallet.v1.GetConfigResponse": {
125
+ "type": "I",
126
+ "fields": {
127
+ "hasServiceAccount": {
128
+ "type": "boolean"
129
+ },
130
+ "issuerId": {
131
+ "type": "string"
132
+ },
133
+ "serviceAccountEmail": {
134
+ "type": "string"
135
+ }
136
+ }
137
+ },
138
+ "pushwoosh.googlewallet.v1.ValidatePassRequest": {
139
+ "type": "I",
140
+ "fields": {
141
+ "pass": {
142
+ "type": "pushwoosh.googlewallet.v1.GooglePass"
143
+ }
144
+ }
145
+ },
146
+ "pushwoosh.googlewallet.v1.ValidatePassResponse": {
147
+ "type": "I",
148
+ "fields": {
149
+ "valid": {
150
+ "type": "boolean"
151
+ },
152
+ "errors": {
153
+ "type": "string",
154
+ "array": true
155
+ },
156
+ "warnings": {
157
+ "type": "string",
158
+ "array": true
159
+ }
160
+ }
161
+ },
162
+ "pushwoosh.googlewallet.v1.CreatePassRequest": {
163
+ "type": "I",
164
+ "fields": {
165
+ "pass": {
166
+ "type": "pushwoosh.googlewallet.v1.GooglePass"
167
+ },
168
+ "applicationCode": {
169
+ "type": "string"
170
+ },
171
+ "userId": {
172
+ "type": "string"
173
+ }
174
+ }
175
+ },
176
+ "pushwoosh.googlewallet.v1.CreatePassResponse": {
177
+ "type": "I",
178
+ "fields": {
179
+ "serialNumber": {
180
+ "type": "string"
181
+ },
182
+ "objectId": {
183
+ "type": "string"
184
+ },
185
+ "saveLink": {
186
+ "type": "string"
187
+ },
188
+ "message": {
189
+ "type": "string"
190
+ }
191
+ }
192
+ },
193
+ "pushwoosh.googlewallet.v1.UpdatePassRequest": {
194
+ "type": "I",
195
+ "fields": {
196
+ "serialNumber": {
197
+ "type": "string"
198
+ },
199
+ "updates": {
200
+ "type": "pushwoosh.googlewallet.v1.GooglePass"
201
+ },
202
+ "applicationCode": {
203
+ "type": "string"
204
+ }
205
+ }
206
+ },
207
+ "pushwoosh.googlewallet.v1.UpdatePassResponse": {
208
+ "type": "I",
209
+ "fields": {
210
+ "success": {
211
+ "type": "boolean"
212
+ },
213
+ "message": {
214
+ "type": "string"
215
+ }
216
+ }
217
+ },
218
+ "pushwoosh.googlewallet.v1.GetSaveLinkRequest": {
219
+ "type": "I",
220
+ "fields": {
221
+ "applicationCode": {
222
+ "type": "string"
223
+ },
224
+ "serialNumber": {
225
+ "type": "string"
226
+ }
227
+ }
228
+ },
229
+ "pushwoosh.googlewallet.v1.GetSaveLinkResponse": {
230
+ "type": "I",
231
+ "fields": {
232
+ "saveLink": {
233
+ "type": "string"
234
+ }
235
+ }
236
+ },
4
237
  "pushwoosh.passkit.v1.PassKitService": {
5
238
  "type": "S",
6
239
  "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.37",
3
+ "version": "0.1.39",
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,131 @@
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
+ /**
8
+ * Google Wallet Service - issues Generic passes via the Google Wallet API.
9
+ *
10
+ * Unlike Apple PassKit there is no signed file to host: the pass class and
11
+ * object live on Google's side (walletobjects REST API), and the user installs
12
+ * the pass via a "save link" - an RS256 JWT signed with the issuer's service
13
+ * account key. Updates are plain object patches; Google delivers them to
14
+ * devices itself (no push infrastructure on our side).
15
+ */
16
+ export interface GoogleWalletService {
17
+ /** Get Google Wallet configuration state for an application */
18
+ GetConfig: GoogleWalletService_GetConfig;
19
+ /** Validate a pass configuration */
20
+ ValidatePass: GoogleWalletService_ValidatePass;
21
+ /** Create a new pass object in Google Wallet */
22
+ CreatePass: GoogleWalletService_CreatePass;
23
+ /** Update an existing pass object (patch; Google delivers the update) */
24
+ UpdatePass: GoogleWalletService_UpdatePass;
25
+ /**
26
+ * Get an "Add to Google Wallet" save link for an already created pass.
27
+ * The link is a thin JWT: it references the object by id only; the object
28
+ * itself must already exist (created via CreatePass).
29
+ */
30
+ GetSaveLink: GoogleWalletService_GetSaveLink;
31
+ }
32
+ /** Text module - a labeled block of text on the pass details view */
33
+ export type GoogleTextModule = {
34
+ id: string;
35
+ header: string;
36
+ body: string;
37
+ };
38
+ /** Link module - an external link on the pass details view */
39
+ export type GoogleLinkModule = {
40
+ uri: string;
41
+ description: string;
42
+ };
43
+ /** Barcode information */
44
+ export type GoogleBarcode = {
45
+ /** QR_CODE, PDF_417, AZTEC, CODE_128, EAN_13, ... */
46
+ format: string;
47
+ value: string;
48
+ altText: string;
49
+ };
50
+ /** Generic pass object data (https://developers.google.com/wallet/generic) */
51
+ export type GooglePass = {
52
+ /**
53
+ * Server-assigned on creation; never set by the client. The full Google
54
+ * object id is "{issuer_id}.{serial_number}".
55
+ */
56
+ serialNumber: string;
57
+ /** required; the issuer/program name at the top */
58
+ cardTitle: string;
59
+ /** required; the main title of the card */
60
+ header: string;
61
+ subheader: string;
62
+ /** "#rrggbb" */
63
+ hexBackgroundColor: string;
64
+ /** Google Wallet images are referenced by public HTTPS URL, not uploaded. */
65
+ logoUrl: string;
66
+ heroImageUrl: string;
67
+ barcode: GoogleBarcode;
68
+ textModules: GoogleTextModule[];
69
+ links: GoogleLinkModule[];
70
+ };
71
+ /** Get config request */
72
+ export type GetConfigRequest = {
73
+ applicationCode: string;
74
+ };
75
+ /** Get config response */
76
+ export type GetConfigResponse = {
77
+ hasServiceAccount: boolean;
78
+ issuerId: string;
79
+ serviceAccountEmail: string;
80
+ };
81
+ /** Validate pass request */
82
+ export type ValidatePassRequest = {
83
+ pass: GooglePass;
84
+ };
85
+ /** Validate pass response */
86
+ export type ValidatePassResponse = {
87
+ valid: boolean;
88
+ errors: string[];
89
+ warnings: string[];
90
+ };
91
+ /** Create pass request */
92
+ export type CreatePassRequest = {
93
+ pass: GooglePass;
94
+ 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
+ */
100
+ userId: string;
101
+ };
102
+ /** Create pass response */
103
+ export type CreatePassResponse = {
104
+ /** Server-assigned unique identity of the created pass (object id suffix). */
105
+ serialNumber: string;
106
+ /** Full Google Wallet object id: "{issuer_id}.{serial_number}". */
107
+ objectId: string;
108
+ /** "Add to Google Wallet" link: https://pay.google.com/gp/v/save/{jwt} */
109
+ saveLink: string;
110
+ message: string;
111
+ };
112
+ /** Update pass request */
113
+ export type UpdatePassRequest = {
114
+ serialNumber: string;
115
+ updates: GooglePass;
116
+ applicationCode: string;
117
+ };
118
+ /** Update pass response */
119
+ export type UpdatePassResponse = {
120
+ success: boolean;
121
+ message: string;
122
+ };
123
+ /** Get save link request */
124
+ export type GetSaveLinkRequest = {
125
+ applicationCode: string;
126
+ serialNumber: string;
127
+ };
128
+ /** Get save link response */
129
+ export type GetSaveLinkResponse = {
130
+ saveLink: string;
131
+ };
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ /* Autogenerated code */
3
+ export {};