@maxim_mazurok/gapi.client.androidpublisher-v3 0.0.20220811

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/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.androidpublisher-v3",
3
+ "version": "0.0.20220811",
4
+ "description": "TypeScript typings for Google Play Android Developer API v3",
5
+ "license": "MIT",
6
+ "author": {
7
+ "email": "maxim@mazurok.com",
8
+ "name": "Maxim Mazurok",
9
+ "url": "https://maxim.mazurok.com"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
14
+ },
15
+ "types": "index.d.ts",
16
+ "dependencies": {
17
+ "@types/gapi.client": "*",
18
+ "@types/gapi.client.discovery": "*"
19
+ }
20
+ }
package/readme.md ADDED
@@ -0,0 +1,203 @@
1
+ # TypeScript typings for Google Play Android Developer API v3
2
+
3
+ Lets Android application developers access their Google Play accounts.
4
+ For detailed description please check [documentation](https://developers.google.com/android-publisher).
5
+
6
+ ## Installing
7
+
8
+ Install typings for Google Play Android Developer API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.androidpublisher-v3 --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('https://androidpublisher.googleapis.com/$discovery/rest?version=v3', () => {
29
+ // now we can use:
30
+ // gapi.client.androidpublisher
31
+ });
32
+ ```
33
+
34
+ ```typescript
35
+ // Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
36
+ gapi.client.load('androidpublisher', 'v3', () => {
37
+ // now we can use:
38
+ // gapi.client.androidpublisher
39
+ });
40
+ ```
41
+
42
+ Don't forget to authenticate your client before sending any request to resources:
43
+
44
+ ```typescript
45
+ // declare client_id registered in Google Developers Console
46
+ var client_id = '',
47
+ scope = [
48
+ // View and manage your Google Play Developer account
49
+ 'https://www.googleapis.com/auth/androidpublisher',
50
+ ],
51
+ immediate = true;
52
+ // ...
53
+
54
+ gapi.auth.authorize(
55
+ { client_id: client_id, scope: scope, immediate: immediate },
56
+ authResult => {
57
+ if (authResult && !authResult.error) {
58
+ /* handle successful authorization */
59
+ } else {
60
+ /* handle authorization error */
61
+ }
62
+ });
63
+ ```
64
+
65
+ After that you can use Google Play Android Developer API resources: <!-- TODO: make this work for multiple namespaces -->
66
+
67
+ ```typescript
68
+
69
+ /*
70
+ Commits an app edit.
71
+ */
72
+ await gapi.client.androidpublisher.edits.commit({ editId: "editId", packageName: "packageName", });
73
+
74
+ /*
75
+ Deletes an app edit.
76
+ */
77
+ await gapi.client.androidpublisher.edits.delete({ editId: "editId", packageName: "packageName", });
78
+
79
+ /*
80
+ Gets an app edit.
81
+ */
82
+ await gapi.client.androidpublisher.edits.get({ editId: "editId", packageName: "packageName", });
83
+
84
+ /*
85
+ Creates a new edit for an app.
86
+ */
87
+ await gapi.client.androidpublisher.edits.insert({ packageName: "packageName", });
88
+
89
+ /*
90
+ Validates an app edit.
91
+ */
92
+ await gapi.client.androidpublisher.edits.validate({ editId: "editId", packageName: "packageName", });
93
+
94
+ /*
95
+ Downloads a single signed APK generated from an app bundle.
96
+ */
97
+ await gapi.client.androidpublisher.generatedapks.download({ downloadId: "downloadId", packageName: "packageName", versionCode: 1, });
98
+
99
+ /*
100
+ Returns download metadata for all APKs that were generated from a given app bundle.
101
+ */
102
+ await gapi.client.androidpublisher.generatedapks.list({ packageName: "packageName", versionCode: 1, });
103
+
104
+ /*
105
+ Grant access for a user to the given package.
106
+ */
107
+ await gapi.client.androidpublisher.grants.create({ parent: "parent", });
108
+
109
+ /*
110
+ Removes all access for the user to the given package or developer account.
111
+ */
112
+ await gapi.client.androidpublisher.grants.delete({ name: "name", });
113
+
114
+ /*
115
+ Updates access for the user to the given package.
116
+ */
117
+ await gapi.client.androidpublisher.grants.patch({ name: "name", });
118
+
119
+ /*
120
+ Deletes an in-app product (i.e. a managed product or a subscriptions).
121
+ */
122
+ await gapi.client.androidpublisher.inappproducts.delete({ packageName: "packageName", sku: "sku", });
123
+
124
+ /*
125
+ Gets an in-app product, which can be a managed product or a subscription.
126
+ */
127
+ await gapi.client.androidpublisher.inappproducts.get({ packageName: "packageName", sku: "sku", });
128
+
129
+ /*
130
+ Creates an in-app product (i.e. a managed product or a subscriptions).
131
+ */
132
+ await gapi.client.androidpublisher.inappproducts.insert({ packageName: "packageName", });
133
+
134
+ /*
135
+ Lists all in-app products - both managed products and subscriptions. If an app has a large number of in-app products, the response may be paginated. In this case the response field `tokenPagination.nextPageToken` will be set and the caller should provide its value as a `token` request parameter to retrieve the next page.
136
+ */
137
+ await gapi.client.androidpublisher.inappproducts.list({ packageName: "packageName", });
138
+
139
+ /*
140
+ Patches an in-app product (i.e. a managed product or a subscriptions).
141
+ */
142
+ await gapi.client.androidpublisher.inappproducts.patch({ packageName: "packageName", sku: "sku", });
143
+
144
+ /*
145
+ Updates an in-app product (i.e. a managed product or a subscriptions).
146
+ */
147
+ await gapi.client.androidpublisher.inappproducts.update({ packageName: "packageName", sku: "sku", });
148
+
149
+ /*
150
+ Uploads an APK to internal app sharing. If you are using the Google API client libraries, please increase the timeout of the http request before calling this endpoint (a timeout of 2 minutes is recommended). See [Timeouts and Errors](https://developers.google.com/api-client-library/java/google-api-java-client/errors) for an example in java.
151
+ */
152
+ await gapi.client.androidpublisher.internalappsharingartifacts.uploadapk({ packageName: "packageName", });
153
+
154
+ /*
155
+ Uploads an app bundle to internal app sharing. If you are using the Google API client libraries, please increase the timeout of the http request before calling this endpoint (a timeout of 2 minutes is recommended). See [Timeouts and Errors](https://developers.google.com/api-client-library/java/google-api-java-client/errors) for an example in java.
156
+ */
157
+ await gapi.client.androidpublisher.internalappsharingartifacts.uploadbundle({ packageName: "packageName", });
158
+
159
+ /*
160
+ Calculates the region prices, using today's exchange rate and country-specific pricing patterns, based on the price in the request for a set of regions.
161
+ */
162
+ await gapi.client.androidpublisher.monetization.convertRegionPrices({ packageName: "packageName", });
163
+
164
+ /*
165
+ Refunds a user's subscription or in-app purchase order. Orders older than 1 year cannot be refunded.
166
+ */
167
+ await gapi.client.androidpublisher.orders.refund({ orderId: "orderId", packageName: "packageName", });
168
+
169
+ /*
170
+ Gets a single review.
171
+ */
172
+ await gapi.client.androidpublisher.reviews.get({ packageName: "packageName", reviewId: "reviewId", });
173
+
174
+ /*
175
+ Lists all reviews.
176
+ */
177
+ await gapi.client.androidpublisher.reviews.list({ packageName: "packageName", });
178
+
179
+ /*
180
+ Replies to a single review, or updates an existing reply.
181
+ */
182
+ await gapi.client.androidpublisher.reviews.reply({ packageName: "packageName", reviewId: "reviewId", });
183
+
184
+ /*
185
+ Grant access for a user to the given developer account.
186
+ */
187
+ await gapi.client.androidpublisher.users.create({ parent: "parent", });
188
+
189
+ /*
190
+ Removes all access for the user to the given developer account.
191
+ */
192
+ await gapi.client.androidpublisher.users.delete({ name: "name", });
193
+
194
+ /*
195
+ Lists all users with access to a developer account.
196
+ */
197
+ await gapi.client.androidpublisher.users.list({ parent: "parent", });
198
+
199
+ /*
200
+ Updates access for the user to the developer account.
201
+ */
202
+ await gapi.client.androidpublisher.users.patch({ name: "name", });
203
+ ```