@maxim_mazurok/gapi.client.fcmdata-v1beta1 0.0.20231127 → 0.0.20231130
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/index.d.ts +113 -186
- package/package.json +6 -6
- package/readme.md +17 -12
- package/tests.ts +0 -39
- package/tsconfig.json +0 -18
- package/tslint.json +0 -6
package/index.d.ts
CHANGED
|
@@ -9,196 +9,123 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://fcmdata.googleapis.com/$discovery/rest?version=v1beta1
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20231130
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
16
16
|
declare namespace gapi.client {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
/** Load Firebase Cloud Messaging Data API v1beta1 */
|
|
18
|
+
function load(
|
|
19
|
+
urlOrObject: 'https://fcmdata.googleapis.com/$discovery/rest?version=v1beta1'
|
|
20
|
+
): Promise<void>;
|
|
21
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
22
|
+
function load(name: 'fcmdata', version: 'v1beta1'): Promise<void>;
|
|
23
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
24
|
+
function load(name: 'fcmdata', version: 'v1beta1', callback: () => any): void;
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
delayedUserStopped?:
|
|
79
|
-
number;
|
|
80
|
-
/** The percentage of accepted messages that were delivered to the device without delay from the FCM system. */
|
|
81
|
-
deliveredNoDelay?:
|
|
82
|
-
number;
|
|
83
|
-
}
|
|
84
|
-
interface GoogleFirebaseFcmDataV1beta1ListAndroidDeliveryDataResponse {
|
|
85
|
-
/** The delivery data for the provided app. There will be one entry per combination of app, date, and analytics label. */
|
|
86
|
-
androidDeliveryData?:
|
|
87
|
-
GoogleFirebaseFcmDataV1beta1AndroidDeliveryData[];
|
|
88
|
-
/** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
|
|
89
|
-
nextPageToken?:
|
|
90
|
-
string;
|
|
91
|
-
}
|
|
92
|
-
interface GoogleFirebaseFcmDataV1beta1MessageInsightPercents {
|
|
93
|
-
/**
|
|
94
|
-
* The percentage of accepted messages that had their priority lowered from high to normal. See [documentation for setting message
|
|
95
|
-
* priority](https://firebase.google.com/docs/cloud-messaging/android/message-priority).
|
|
96
|
-
*/
|
|
97
|
-
priorityLowered?:
|
|
98
|
-
number;
|
|
99
|
-
}
|
|
100
|
-
interface GoogleFirebaseFcmDataV1beta1MessageOutcomePercents {
|
|
101
|
-
/** The percentage of all accepted messages that were successfully delivered to the device. */
|
|
102
|
-
delivered?:
|
|
103
|
-
number;
|
|
104
|
-
/** The percentage of accepted messages that were dropped because the application was force stopped on the device at the time of delivery and retries were unsuccessful. */
|
|
105
|
-
droppedAppForceStopped?:
|
|
106
|
-
number;
|
|
107
|
-
/**
|
|
108
|
-
* The percentage of accepted messages that were dropped because the target device is inactive. FCM will drop messages if the target device is deemed inactive by our servers. If a
|
|
109
|
-
* device does reconnect, we call [OnDeletedMessages()](https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages) in our SDK instead of delivering
|
|
110
|
-
* the messages.
|
|
111
|
-
*/
|
|
112
|
-
droppedDeviceInactive?:
|
|
113
|
-
number;
|
|
114
|
-
/**
|
|
115
|
-
* The percentage of accepted messages that were dropped due to [too many undelivered non-collapsible
|
|
116
|
-
* messages](https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages). Specifically, each app instance can only have 100 pending
|
|
117
|
-
* messages stored on our servers for a device which is disconnected. When that device reconnects, those messages are delivered. When there are more than the maximum pending messages,
|
|
118
|
-
* we call [OnDeletedMessages()](https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages) in our SDK instead of delivering the messages.
|
|
119
|
-
*/
|
|
120
|
-
droppedTooManyPendingMessages?:
|
|
121
|
-
number;
|
|
122
|
-
/**
|
|
123
|
-
* The percentage of messages accepted on this day that were not dropped and not delivered, due to the device being disconnected (as of the end of the America/Los_Angeles day when the
|
|
124
|
-
* message was sent to FCM). A portion of these messages will be delivered the next day when the device connects but others may be destined to devices that ultimately never reconnect.
|
|
125
|
-
*/
|
|
126
|
-
pending?:
|
|
127
|
-
number;
|
|
128
|
-
}
|
|
129
|
-
interface GoogleTypeDate {
|
|
130
|
-
/** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */
|
|
131
|
-
day?:
|
|
132
|
-
number;
|
|
133
|
-
/** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */
|
|
134
|
-
month?:
|
|
135
|
-
number;
|
|
136
|
-
/** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */
|
|
137
|
-
year?:
|
|
138
|
-
number;
|
|
139
|
-
}
|
|
140
|
-
interface DeliveryDataResource {
|
|
141
|
-
/** List aggregate delivery data for the given Android application. */
|
|
142
|
-
list(request?: {
|
|
143
|
-
/** V1 error format. */
|
|
144
|
-
"$.xgafv"?:
|
|
145
|
-
string;
|
|
146
|
-
/** OAuth access token. */
|
|
147
|
-
access_token?:
|
|
148
|
-
string;
|
|
149
|
-
/** Data format for response. */
|
|
150
|
-
alt?:
|
|
151
|
-
string;
|
|
152
|
-
/** JSONP */
|
|
153
|
-
callback?:
|
|
154
|
-
string;
|
|
155
|
-
/** Selector specifying which fields to include in a partial response. */
|
|
156
|
-
fields?:
|
|
157
|
-
string;
|
|
158
|
-
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
159
|
-
key?:
|
|
160
|
-
string;
|
|
161
|
-
/** OAuth 2.0 token for the current user. */
|
|
162
|
-
oauth_token?:
|
|
163
|
-
string;
|
|
164
|
-
/**
|
|
165
|
-
* The maximum number of entries to return. The service may return fewer than this value. If unspecified, at most 1,000 entries will be returned. The maximum value is 10,000;
|
|
166
|
-
* values above 10,000 will be capped to 10,000. This default may change over time.
|
|
167
|
-
*/
|
|
168
|
-
pageSize?:
|
|
169
|
-
number;
|
|
170
|
-
/**
|
|
171
|
-
* A page token, received from a previous `ListAndroidDeliveryDataRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to
|
|
172
|
-
* `ListAndroidDeliveryDataRequest` must match the call that provided the page token.
|
|
173
|
-
*/
|
|
174
|
-
pageToken?:
|
|
175
|
-
string;
|
|
176
|
-
/** Required. The application for which to list delivery data. Format: `projects/{project_id}/androidApps/{app_id}` */
|
|
177
|
-
parent:
|
|
178
|
-
string;
|
|
179
|
-
/** Returns response with indentations and line breaks. */
|
|
180
|
-
prettyPrint?:
|
|
181
|
-
boolean;
|
|
182
|
-
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
183
|
-
quotaUser?:
|
|
184
|
-
string;
|
|
185
|
-
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
186
|
-
upload_protocol?:
|
|
187
|
-
string;
|
|
188
|
-
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
189
|
-
uploadType?:
|
|
190
|
-
string;
|
|
191
|
-
}): Request<GoogleFirebaseFcmDataV1beta1ListAndroidDeliveryDataResponse>;
|
|
192
|
-
}
|
|
193
|
-
interface AndroidAppsResource {
|
|
194
|
-
deliveryData:
|
|
195
|
-
DeliveryDataResource;
|
|
196
|
-
}
|
|
197
|
-
interface ProjectsResource {
|
|
198
|
-
androidApps:
|
|
199
|
-
AndroidAppsResource;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
const projects: ProjectsResource;
|
|
26
|
+
namespace fcmdata {
|
|
27
|
+
interface GoogleFirebaseFcmDataV1beta1AndroidDeliveryData {
|
|
28
|
+
/** The analytics label associated with the messages sent. All messages sent without an analytics label will be grouped together in a single entry. */
|
|
29
|
+
analyticsLabel?: string;
|
|
30
|
+
/** The app ID to which the messages were sent. */
|
|
31
|
+
appId?: string;
|
|
32
|
+
/** The data for the specified appId, date, and analyticsLabel. */
|
|
33
|
+
data?: GoogleFirebaseFcmDataV1beta1Data;
|
|
34
|
+
/** The date represented by this entry. */
|
|
35
|
+
date?: GoogleTypeDate;
|
|
36
|
+
}
|
|
37
|
+
interface GoogleFirebaseFcmDataV1beta1Data {
|
|
38
|
+
/** Count of messages accepted by FCM intended to Android devices. The targeted device must have opted in to the collection of usage and diagnostic information. */
|
|
39
|
+
countMessagesAccepted?: string;
|
|
40
|
+
/** Additional information about delivery performance for messages that were successfully delivered. */
|
|
41
|
+
deliveryPerformancePercents?: GoogleFirebaseFcmDataV1beta1DeliveryPerformancePercents;
|
|
42
|
+
/** Additional general insights about message delivery. */
|
|
43
|
+
messageInsightPercents?: GoogleFirebaseFcmDataV1beta1MessageInsightPercents;
|
|
44
|
+
/** Mutually exclusive breakdown of message delivery outcomes. */
|
|
45
|
+
messageOutcomePercents?: GoogleFirebaseFcmDataV1beta1MessageOutcomePercents;
|
|
46
|
+
}
|
|
47
|
+
interface GoogleFirebaseFcmDataV1beta1DeliveryPerformancePercents {
|
|
48
|
+
/** The percentage of accepted messages that were delayed because the device was in doze mode. Only [normal priority messages](https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message) should be delayed due to doze mode. */
|
|
49
|
+
delayedDeviceDoze?: number;
|
|
50
|
+
/** The percentage of accepted messages that were delayed because the target device was not connected at the time of sending. These messages were eventually delivered when the device reconnected. */
|
|
51
|
+
delayedDeviceOffline?: number;
|
|
52
|
+
/** The percentage of accepted messages that were delayed due to message throttling, such as [collapsible message throttling](https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_throttling) or [maximum message rate throttling](https://firebase.google.com/docs/cloud-messaging/concept-options#device_throttling). */
|
|
53
|
+
delayedMessageThrottled?: number;
|
|
54
|
+
/** The percentage of accepted messages that were delayed because the intended device user-profile was [stopped](https://firebase.google.com/docs/cloud-messaging/android/receive#handling_messages) on the target device at the time of the send. The messages were eventually delivered when the user-profile was started again. */
|
|
55
|
+
delayedUserStopped?: number;
|
|
56
|
+
/** The percentage of accepted messages that were delivered to the device without delay from the FCM system. */
|
|
57
|
+
deliveredNoDelay?: number;
|
|
58
|
+
}
|
|
59
|
+
interface GoogleFirebaseFcmDataV1beta1ListAndroidDeliveryDataResponse {
|
|
60
|
+
/** The delivery data for the provided app. There will be one entry per combination of app, date, and analytics label. */
|
|
61
|
+
androidDeliveryData?: GoogleFirebaseFcmDataV1beta1AndroidDeliveryData[];
|
|
62
|
+
/** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
|
|
63
|
+
nextPageToken?: string;
|
|
64
|
+
}
|
|
65
|
+
interface GoogleFirebaseFcmDataV1beta1MessageInsightPercents {
|
|
66
|
+
/** The percentage of accepted messages that had their priority lowered from high to normal. See [documentation for setting message priority](https://firebase.google.com/docs/cloud-messaging/android/message-priority). */
|
|
67
|
+
priorityLowered?: number;
|
|
68
|
+
}
|
|
69
|
+
interface GoogleFirebaseFcmDataV1beta1MessageOutcomePercents {
|
|
70
|
+
/** The percentage of all accepted messages that were successfully delivered to the device. */
|
|
71
|
+
delivered?: number;
|
|
72
|
+
/** The percentage of accepted messages that were dropped because the application was force stopped on the device at the time of delivery and retries were unsuccessful. */
|
|
73
|
+
droppedAppForceStopped?: number;
|
|
74
|
+
/** The percentage of accepted messages that were dropped because the target device is inactive. FCM will drop messages if the target device is deemed inactive by our servers. If a device does reconnect, we call [OnDeletedMessages()](https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages) in our SDK instead of delivering the messages. */
|
|
75
|
+
droppedDeviceInactive?: number;
|
|
76
|
+
/** The percentage of accepted messages that were dropped due to [too many undelivered non-collapsible messages](https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages). Specifically, each app instance can only have 100 pending messages stored on our servers for a device which is disconnected. When that device reconnects, those messages are delivered. When there are more than the maximum pending messages, we call [OnDeletedMessages()](https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages) in our SDK instead of delivering the messages. */
|
|
77
|
+
droppedTooManyPendingMessages?: number;
|
|
78
|
+
/** The percentage of messages accepted on this day that were not dropped and not delivered, due to the device being disconnected (as of the end of the America/Los_Angeles day when the message was sent to FCM). A portion of these messages will be delivered the next day when the device connects but others may be destined to devices that ultimately never reconnect. */
|
|
79
|
+
pending?: number;
|
|
203
80
|
}
|
|
81
|
+
interface GoogleTypeDate {
|
|
82
|
+
/** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */
|
|
83
|
+
day?: number;
|
|
84
|
+
/** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */
|
|
85
|
+
month?: number;
|
|
86
|
+
/** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */
|
|
87
|
+
year?: number;
|
|
88
|
+
}
|
|
89
|
+
interface DeliveryDataResource {
|
|
90
|
+
/** List aggregate delivery data for the given Android application. */
|
|
91
|
+
list(request?: {
|
|
92
|
+
/** V1 error format. */
|
|
93
|
+
'$.xgafv'?: string;
|
|
94
|
+
/** OAuth access token. */
|
|
95
|
+
access_token?: string;
|
|
96
|
+
/** Data format for response. */
|
|
97
|
+
alt?: string;
|
|
98
|
+
/** JSONP */
|
|
99
|
+
callback?: string;
|
|
100
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
101
|
+
fields?: string;
|
|
102
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
103
|
+
key?: string;
|
|
104
|
+
/** OAuth 2.0 token for the current user. */
|
|
105
|
+
oauth_token?: string;
|
|
106
|
+
/** The maximum number of entries to return. The service may return fewer than this value. If unspecified, at most 1,000 entries will be returned. The maximum value is 10,000; values above 10,000 will be capped to 10,000. This default may change over time. */
|
|
107
|
+
pageSize?: number;
|
|
108
|
+
/** A page token, received from a previous `ListAndroidDeliveryDataRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAndroidDeliveryDataRequest` must match the call that provided the page token. */
|
|
109
|
+
pageToken?: string;
|
|
110
|
+
/** Required. The application for which to list delivery data. Format: `projects/{project_id}/androidApps/{app_id}` */
|
|
111
|
+
parent: string;
|
|
112
|
+
/** Returns response with indentations and line breaks. */
|
|
113
|
+
prettyPrint?: boolean;
|
|
114
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
115
|
+
quotaUser?: string;
|
|
116
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
117
|
+
upload_protocol?: string;
|
|
118
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
119
|
+
uploadType?: string;
|
|
120
|
+
}): Request<GoogleFirebaseFcmDataV1beta1ListAndroidDeliveryDataResponse>;
|
|
121
|
+
}
|
|
122
|
+
interface AndroidAppsResource {
|
|
123
|
+
deliveryData: DeliveryDataResource;
|
|
124
|
+
}
|
|
125
|
+
interface ProjectsResource {
|
|
126
|
+
androidApps: AndroidAppsResource;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const projects: ProjectsResource;
|
|
130
|
+
}
|
|
204
131
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxim_mazurok/gapi.client.fcmdata-v1beta1",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20231130",
|
|
4
4
|
"description": "TypeScript typings for Firebase Cloud Messaging Data API v1beta1",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
8
|
+
},
|
|
5
9
|
"license": "MIT",
|
|
6
10
|
"author": {
|
|
7
|
-
"email": "maxim@mazurok.com",
|
|
8
11
|
"name": "Maxim Mazurok",
|
|
12
|
+
"email": "maxim@mazurok.com",
|
|
9
13
|
"url": "https://maxim.mazurok.com"
|
|
10
14
|
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
14
|
-
},
|
|
15
15
|
"types": "index.d.ts",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@types/gapi.client": "*",
|
package/readme.md
CHANGED
|
@@ -25,10 +25,13 @@ gapi.load('client', () => {
|
|
|
25
25
|
Then load api client wrapper:
|
|
26
26
|
|
|
27
27
|
```typescript
|
|
28
|
-
gapi.client.load(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
gapi.client.load(
|
|
29
|
+
'https://fcmdata.googleapis.com/$discovery/rest?version=v1beta1',
|
|
30
|
+
() => {
|
|
31
|
+
// now we can use:
|
|
32
|
+
// gapi.client.fcmdata
|
|
33
|
+
}
|
|
34
|
+
);
|
|
32
35
|
```
|
|
33
36
|
|
|
34
37
|
```typescript
|
|
@@ -45,24 +48,26 @@ Don't forget to authenticate your client before sending any request to resources
|
|
|
45
48
|
// declare client_id registered in Google Developers Console
|
|
46
49
|
var client_id = '',
|
|
47
50
|
scope = [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
|
52
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
53
|
+
],
|
|
54
|
+
immediate = true;
|
|
52
55
|
// ...
|
|
53
56
|
|
|
54
57
|
gapi.auth.authorize(
|
|
55
|
-
{
|
|
58
|
+
{client_id: client_id, scope: scope, immediate: immediate},
|
|
56
59
|
authResult => {
|
|
57
60
|
if (authResult && !authResult.error) {
|
|
58
|
-
|
|
61
|
+
/* handle successful authorization */
|
|
59
62
|
} else {
|
|
60
|
-
|
|
63
|
+
/* handle authorization error */
|
|
61
64
|
}
|
|
62
|
-
}
|
|
65
|
+
}
|
|
66
|
+
);
|
|
63
67
|
```
|
|
64
68
|
|
|
65
69
|
After that you can use Firebase Cloud Messaging Data API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
66
70
|
|
|
67
71
|
```typescript
|
|
72
|
+
|
|
68
73
|
```
|
package/tests.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/* This is stub file for gapi.client.fcmdata-v1beta1 definition tests */
|
|
2
|
-
// IMPORTANT
|
|
3
|
-
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
|
-
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
|
-
|
|
6
|
-
// Revision: 20231127
|
|
7
|
-
|
|
8
|
-
gapi.load('client', async () => {
|
|
9
|
-
/** now we can use gapi.client */
|
|
10
|
-
|
|
11
|
-
await gapi.client.load('https://fcmdata.googleapis.com/$discovery/rest?version=v1beta1');
|
|
12
|
-
/** now we can use gapi.client.fcmdata */
|
|
13
|
-
|
|
14
|
-
/** don't forget to authenticate your client before sending any request to resources: */
|
|
15
|
-
/** declare client_id registered in Google Developers Console */
|
|
16
|
-
const client_id = '<<PUT YOUR CLIENT ID HERE>>';
|
|
17
|
-
const scope = [
|
|
18
|
-
/** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
|
|
19
|
-
'https://www.googleapis.com/auth/cloud-platform',
|
|
20
|
-
];
|
|
21
|
-
const immediate = false;
|
|
22
|
-
gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
|
|
23
|
-
if (authResult && !authResult.error) {
|
|
24
|
-
/** handle successful authorization */
|
|
25
|
-
run();
|
|
26
|
-
} else {
|
|
27
|
-
/** handle authorization error */
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
async function run() {
|
|
32
|
-
/** List aggregate delivery data for the given Android application. */
|
|
33
|
-
await gapi.client.fcmdata.projects.androidApps.deliveryData.list({
|
|
34
|
-
pageSize: 42,
|
|
35
|
-
pageToken: "Test string",
|
|
36
|
-
parent: "Test string",
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
});
|
package/tsconfig.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"lib": ["es6", "dom"],
|
|
5
|
-
"noImplicitAny": true,
|
|
6
|
-
"noImplicitThis": true,
|
|
7
|
-
"strictNullChecks": true,
|
|
8
|
-
"baseUrl": "../",
|
|
9
|
-
"typeRoots": [
|
|
10
|
-
"../"
|
|
11
|
-
],
|
|
12
|
-
"types": [],
|
|
13
|
-
"noEmit": true,
|
|
14
|
-
"forceConsistentCasingInFileNames": true,
|
|
15
|
-
"strictFunctionTypes": true
|
|
16
|
-
},
|
|
17
|
-
"files": ["index.d.ts", "tests.ts"]
|
|
18
|
-
}
|