@orchesty/connector-onesignal 1.0.0 → 1.0.1
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/dist/package.json +4 -1
- package/package.json +4 -1
- package/CHANGELOG.md +0 -7
- package/coverage/clover.xml +0 -95
- package/coverage/coverage-final.json +0 -5
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -161
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/src/Batch/OnesignalViewAppsBatch.ts.html +0 -265
- package/coverage/lcov-report/src/Batch/index.html +0 -116
- package/coverage/lcov-report/src/Connector/OnesignalCreateAppConnector.ts.html +0 -316
- package/coverage/lcov-report/src/Connector/index.html +0 -116
- package/coverage/lcov-report/src/OnesignalApplication.ts.html +0 -298
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/test/dataProvider.ts.html +0 -181
- package/coverage/lcov-report/test/index.html +0 -116
- package/coverage/lcov.info +0 -129
- package/jest.config.js +0 -13
- package/src/Batch/OnesignalViewAppsBatch.ts +0 -60
- package/src/Batch/__tests__/Data/OnesignalViewAppsBatch/input.json +0 -6
- package/src/Batch/__tests__/Data/OnesignalViewAppsBatch/mock.json +0 -58
- package/src/Batch/__tests__/Data/OnesignalViewAppsBatch/output.json +0 -15
- package/src/Batch/__tests__/OnesignalViewAppsBatch.ts +0 -17
- package/src/Connector/OnesignalCreateAppConnector.ts +0 -77
- package/src/Connector/__tests__/Data/OnesignalCreateAppConnector/input.json +0 -8
- package/src/Connector/__tests__/Data/OnesignalCreateAppConnector/mock.json +0 -32
- package/src/Connector/__tests__/Data/OnesignalCreateAppConnector/output.json +0 -33
- package/src/Connector/__tests__/OnesignalCreateAppConnector.ts +0 -17
- package/src/OnesignalApplication.ts +0 -71
- package/test/dataProvider.ts +0 -32
- package/tsconfig.json +0 -8
- package/tsconfig.prod.json +0 -13
- package/tsconfig.prod.tsbuildinfo +0 -1
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for test</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../index.html">All files</a> test</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">100% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>16/16</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">100% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/0</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">100% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>1/1</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">100% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>16/16</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line high'></div>
|
|
65
|
-
<div class="pad1">
|
|
66
|
-
<table class="coverage-summary">
|
|
67
|
-
<thead>
|
|
68
|
-
<tr>
|
|
69
|
-
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
70
|
-
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
71
|
-
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
72
|
-
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
73
|
-
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
74
|
-
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
75
|
-
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
76
|
-
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
77
|
-
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
78
|
-
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
79
|
-
</tr>
|
|
80
|
-
</thead>
|
|
81
|
-
<tbody><tr>
|
|
82
|
-
<td class="file high" data-value="dataProvider.ts"><a href="dataProvider.ts.html">dataProvider.ts</a></td>
|
|
83
|
-
<td data-value="100" class="pic high">
|
|
84
|
-
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
|
85
|
-
</td>
|
|
86
|
-
<td data-value="100" class="pct high">100%</td>
|
|
87
|
-
<td data-value="16" class="abs high">16/16</td>
|
|
88
|
-
<td data-value="100" class="pct high">100%</td>
|
|
89
|
-
<td data-value="0" class="abs high">0/0</td>
|
|
90
|
-
<td data-value="100" class="pct high">100%</td>
|
|
91
|
-
<td data-value="1" class="abs high">1/1</td>
|
|
92
|
-
<td data-value="100" class="pct high">100%</td>
|
|
93
|
-
<td data-value="16" class="abs high">16/16</td>
|
|
94
|
-
</tr>
|
|
95
|
-
|
|
96
|
-
</tbody>
|
|
97
|
-
</table>
|
|
98
|
-
</div>
|
|
99
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
100
|
-
</div><!-- /wrapper -->
|
|
101
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
|
-
Code coverage generated by
|
|
103
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2026-01-15T09:49:49.394Z
|
|
105
|
-
</div>
|
|
106
|
-
<script src="../prettify.js"></script>
|
|
107
|
-
<script>
|
|
108
|
-
window.onload = function () {
|
|
109
|
-
prettyPrint();
|
|
110
|
-
};
|
|
111
|
-
</script>
|
|
112
|
-
<script src="../sorter.js"></script>
|
|
113
|
-
<script src="../block-navigation.js"></script>
|
|
114
|
-
</body>
|
|
115
|
-
</html>
|
|
116
|
-
|
package/coverage/lcov.info
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
TN:
|
|
2
|
-
SF:src/OnesignalApplication.ts
|
|
3
|
-
FN:19,(anonymous_10)
|
|
4
|
-
FN:23,(anonymous_11)
|
|
5
|
-
FN:27,(anonymous_12)
|
|
6
|
-
FN:31,(anonymous_13)
|
|
7
|
-
FN:35,(anonymous_14)
|
|
8
|
-
FN:42,(anonymous_15)
|
|
9
|
-
FN:47,(anonymous_16)
|
|
10
|
-
FNF:7
|
|
11
|
-
FNH:2
|
|
12
|
-
FNDA:4,(anonymous_10)
|
|
13
|
-
FNDA:0,(anonymous_11)
|
|
14
|
-
FNDA:0,(anonymous_12)
|
|
15
|
-
FNDA:0,(anonymous_13)
|
|
16
|
-
FNDA:0,(anonymous_14)
|
|
17
|
-
FNDA:0,(anonymous_15)
|
|
18
|
-
FNDA:2,(anonymous_16)
|
|
19
|
-
DA:1,2
|
|
20
|
-
DA:3,2
|
|
21
|
-
DA:4,2
|
|
22
|
-
DA:5,2
|
|
23
|
-
DA:6,2
|
|
24
|
-
DA:7,2
|
|
25
|
-
DA:8,2
|
|
26
|
-
DA:11,2
|
|
27
|
-
DA:13,2
|
|
28
|
-
DA:14,2
|
|
29
|
-
DA:15,2
|
|
30
|
-
DA:17,2
|
|
31
|
-
DA:20,4
|
|
32
|
-
DA:24,0
|
|
33
|
-
DA:28,0
|
|
34
|
-
DA:32,0
|
|
35
|
-
DA:36,0
|
|
36
|
-
DA:39,0
|
|
37
|
-
DA:43,0
|
|
38
|
-
DA:44,0
|
|
39
|
-
DA:54,2
|
|
40
|
-
DA:55,2
|
|
41
|
-
DA:56,2
|
|
42
|
-
DA:57,2
|
|
43
|
-
DA:58,2
|
|
44
|
-
DA:64,2
|
|
45
|
-
DA:65,1
|
|
46
|
-
DA:68,2
|
|
47
|
-
LF:28
|
|
48
|
-
LH:21
|
|
49
|
-
BRDA:64,0,0,1
|
|
50
|
-
BRDA:64,0,1,1
|
|
51
|
-
BRF:2
|
|
52
|
-
BRH:2
|
|
53
|
-
end_of_record
|
|
54
|
-
TN:
|
|
55
|
-
SF:src/Batch/OnesignalViewAppsBatch.ts
|
|
56
|
-
FN:9,(anonymous_1)
|
|
57
|
-
FN:13,(anonymous_2)
|
|
58
|
-
FNF:2
|
|
59
|
-
FNH:2
|
|
60
|
-
FNDA:2,(anonymous_1)
|
|
61
|
-
FNDA:1,(anonymous_2)
|
|
62
|
-
DA:1,2
|
|
63
|
-
DA:2,2
|
|
64
|
-
DA:5,2
|
|
65
|
-
DA:7,2
|
|
66
|
-
DA:10,2
|
|
67
|
-
DA:14,1
|
|
68
|
-
DA:15,1
|
|
69
|
-
DA:21,1
|
|
70
|
-
DA:22,1
|
|
71
|
-
DA:24,1
|
|
72
|
-
DA:25,1
|
|
73
|
-
DA:27,1
|
|
74
|
-
LF:12
|
|
75
|
-
LH:12
|
|
76
|
-
BRDA:24,0,0,1
|
|
77
|
-
BRDA:24,0,1,0
|
|
78
|
-
BRF:2
|
|
79
|
-
BRH:1
|
|
80
|
-
end_of_record
|
|
81
|
-
TN:
|
|
82
|
-
SF:src/Connector/OnesignalCreateAppConnector.ts
|
|
83
|
-
FN:9,(anonymous_1)
|
|
84
|
-
FN:13,(anonymous_2)
|
|
85
|
-
FNF:2
|
|
86
|
-
FNH:2
|
|
87
|
-
FNDA:2,(anonymous_1)
|
|
88
|
-
FNDA:1,(anonymous_2)
|
|
89
|
-
DA:1,2
|
|
90
|
-
DA:2,2
|
|
91
|
-
DA:5,2
|
|
92
|
-
DA:7,2
|
|
93
|
-
DA:10,2
|
|
94
|
-
DA:14,1
|
|
95
|
-
DA:15,1
|
|
96
|
-
DA:22,1
|
|
97
|
-
DA:24,1
|
|
98
|
-
LF:9
|
|
99
|
-
LH:9
|
|
100
|
-
BRF:0
|
|
101
|
-
BRH:0
|
|
102
|
-
end_of_record
|
|
103
|
-
TN:
|
|
104
|
-
SF:test/dataProvider.ts
|
|
105
|
-
FN:8,init
|
|
106
|
-
FNF:1
|
|
107
|
-
FNH:1
|
|
108
|
-
FNDA:2,init
|
|
109
|
-
DA:1,2
|
|
110
|
-
DA:2,2
|
|
111
|
-
DA:3,2
|
|
112
|
-
DA:4,2
|
|
113
|
-
DA:5,2
|
|
114
|
-
DA:6,2
|
|
115
|
-
DA:8,2
|
|
116
|
-
DA:9,2
|
|
117
|
-
DA:15,2
|
|
118
|
-
DA:16,2
|
|
119
|
-
DA:18,2
|
|
120
|
-
DA:19,2
|
|
121
|
-
DA:21,2
|
|
122
|
-
DA:25,2
|
|
123
|
-
DA:27,2
|
|
124
|
-
DA:31,2
|
|
125
|
-
LF:16
|
|
126
|
-
LH:16
|
|
127
|
-
BRF:0
|
|
128
|
-
BRH:0
|
|
129
|
-
end_of_record
|
package/jest.config.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const baseConfig = require('../../jest.config.js');
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
...baseConfig,
|
|
5
|
-
roots: ["<rootDir>/src"],
|
|
6
|
-
setupFiles: ["<rootDir>/../../.jest/testEnvs.ts"],
|
|
7
|
-
setupFilesAfterEnv: ["<rootDir>/../../.jest/testLifecycle.ts"],
|
|
8
|
-
globalSetup: "<rootDir>/../../.jest/globalSetup.ts",
|
|
9
|
-
moduleNameMapper: {
|
|
10
|
-
"^@orchesty/nodejs-connectors/test/(.*)$": "<rootDir>/../../test/$1",
|
|
11
|
-
"^@orchesty/nodejs-connectors/lib/(.*)$": "<rootDir>/../../lib/$1",
|
|
12
|
-
},
|
|
13
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
|
|
2
|
-
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
3
|
-
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
|
|
4
|
-
|
|
5
|
-
export const NAME = 'onesignal-view-apps-batch';
|
|
6
|
-
|
|
7
|
-
export default class OnesignalViewAppsBatch extends ABatchNode {
|
|
8
|
-
|
|
9
|
-
public getName(): string {
|
|
10
|
-
return NAME;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
public async processAction(dto: BatchProcessDto): Promise<BatchProcessDto> {
|
|
14
|
-
const appInstall = await this.getApplicationInstallFromProcess(dto);
|
|
15
|
-
const req = await this.getApplication().getRequestDto(
|
|
16
|
-
dto,
|
|
17
|
-
appInstall,
|
|
18
|
-
HttpMethods.GET,
|
|
19
|
-
'apps',
|
|
20
|
-
);
|
|
21
|
-
const resp = await this.getSender().send<IOutput[]>(req, [200]);
|
|
22
|
-
const response = resp.getJsonBody();
|
|
23
|
-
|
|
24
|
-
dto.setItemList(response ?? []);
|
|
25
|
-
dto.removeBatchCursor();
|
|
26
|
-
|
|
27
|
-
return dto;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
33
|
-
export interface IOutput {
|
|
34
|
-
id: string;
|
|
35
|
-
name: string;
|
|
36
|
-
players: number;
|
|
37
|
-
messageable_players: number;
|
|
38
|
-
updated_at: string;
|
|
39
|
-
created_at: string;
|
|
40
|
-
gcm_key: string;
|
|
41
|
-
chrome_key: string;
|
|
42
|
-
chrome_web_origin: string;
|
|
43
|
-
chrome_web_gcm_sender_id: string;
|
|
44
|
-
chrome_web_default_notification_icon: string;
|
|
45
|
-
chrome_web_sub_domain: string;
|
|
46
|
-
apns_env: string;
|
|
47
|
-
apns_certificates: string;
|
|
48
|
-
safari_apns_certificate: string;
|
|
49
|
-
safari_site_origin: string;
|
|
50
|
-
safari_push_id: string;
|
|
51
|
-
safari_icon_16_16: string;
|
|
52
|
-
safari_icon_32_32: string;
|
|
53
|
-
safari_icon_64_64: string;
|
|
54
|
-
safari_icon_128_128: string;
|
|
55
|
-
safari_icon_256_256: string;
|
|
56
|
-
site_name: string;
|
|
57
|
-
basic_auth_key: string;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"http": "GET https://onesignal.com/api/v1/apps",
|
|
3
|
-
"code": 200,
|
|
4
|
-
"body": [
|
|
5
|
-
{
|
|
6
|
-
"apns_certificates": "Your apns certificate",
|
|
7
|
-
"apns_env": "sandbox",
|
|
8
|
-
"basic_auth_key": "NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj",
|
|
9
|
-
"chrome_key": "A Chrome Web Push GCM key",
|
|
10
|
-
"chrome_web_default_notification_icon": "http://yoursite.com/chrome_notification_icon",
|
|
11
|
-
"chrome_web_gcm_sender_id": "Chrome Web Push GCM Sender ID",
|
|
12
|
-
"chrome_web_origin": "Chrome Web Push Site URL",
|
|
13
|
-
"chrome_web_sub_domain": "your_site_name",
|
|
14
|
-
"created_at": "2014-04-01T04:20:02.003Z",
|
|
15
|
-
"gcm_key": "a gcm push key",
|
|
16
|
-
"id": "92911750-242d-4260-9e00-9d9034f139ce",
|
|
17
|
-
"messageable_players": 143,
|
|
18
|
-
"name": "Your app 1",
|
|
19
|
-
"players": 150,
|
|
20
|
-
"safari_apns_certificate": "Your Safari APNS certificate",
|
|
21
|
-
"safari_icon_128_128": "http://onesignal.com/safari_packages/92911750-242d-4260-9e00-9d9034f139ce/128x128.png",
|
|
22
|
-
"safari_icon_16_16": "http://onesignal.com/safari_packages/92911750-242d-4260-9e00-9d9034f139ce/16x16.png",
|
|
23
|
-
"safari_icon_256_256": "http://onesignal.com/safari_packages/92911750-242d-4260-9e00-9d9034f139ce/128x128@2x.png",
|
|
24
|
-
"safari_icon_32_32": "http://onesignal.com/safari_packages/92911750-242d-4260-9e00-9d9034f139ce/16x16@2.png",
|
|
25
|
-
"safari_icon_64_64": "http://onesignal.com/safari_packages/92911750-242d-4260-9e00-9d9034f139ce/32x32@2x.png",
|
|
26
|
-
"safari_push_id": "The certificate bundle ID for Safari Web Push",
|
|
27
|
-
"safari_site_origin": "The homename for your website for Safari Push, including http or https",
|
|
28
|
-
"site_name": "The URL to your website for Web Push",
|
|
29
|
-
"updated_at": "2014-04-01T04:20:02.003Z"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"apns_certificates": "Your apns certificate",
|
|
33
|
-
"apns_env": "sandbox",
|
|
34
|
-
"basic_auth_key": "NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj",
|
|
35
|
-
"chrome_key": "A Chrome Web Push GCM key",
|
|
36
|
-
"chrome_web_default_notification_icon": "http://yoursite.com/chrome_notification_icon",
|
|
37
|
-
"chrome_web_gcm_sender_id": "Chrome Web Push GCM Sender ID",
|
|
38
|
-
"chrome_web_origin": "Chrome Web Push Site URL",
|
|
39
|
-
"chrome_web_sub_domain": "your_site_name",
|
|
40
|
-
"created_at": "2014-04-01T04:20:02.003Z",
|
|
41
|
-
"gcm_key": "a gcm push key",
|
|
42
|
-
"id": "e4e87830-b954-11e3-811d-f3b376925f15",
|
|
43
|
-
"messageable_players": 80,
|
|
44
|
-
"name": "Your app 2",
|
|
45
|
-
"players": 100,
|
|
46
|
-
"safari_apns_certificate": "Your Safari APNS certificate",
|
|
47
|
-
"safari_icon_128_128": "http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/128x128.png",
|
|
48
|
-
"safari_icon_16_16": "http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/16x16.png",
|
|
49
|
-
"safari_icon_256_256": "http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/128x128@2x.png",
|
|
50
|
-
"safari_icon_32_32": "http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/16x16@2.png",
|
|
51
|
-
"safari_icon_64_64": "http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/32x32@2x.png",
|
|
52
|
-
"safari_push_id": "The certificate bundle ID for Safari Web Push",
|
|
53
|
-
"safari_site_origin": "The homename for your website for Safari Push, including http or https",
|
|
54
|
-
"site_name": "The URL to your website for Web Push",
|
|
55
|
-
"updated_at": "2014-04-01T04:20:02.003Z"
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"headers": {
|
|
3
|
-
"user": "TestUser"
|
|
4
|
-
},
|
|
5
|
-
"data": [
|
|
6
|
-
{
|
|
7
|
-
"body": "{\"apns_certificates\":\"Your apns certificate\",\"apns_env\":\"sandbox\",\"basic_auth_key\":\"NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj\",\"chrome_key\":\"A Chrome Web Push GCM key\",\"chrome_web_default_notification_icon\":\"http://yoursite.com/chrome_notification_icon\",\"chrome_web_gcm_sender_id\":\"Chrome Web Push GCM Sender ID\",\"chrome_web_origin\":\"Chrome Web Push Site URL\",\"chrome_web_sub_domain\":\"your_site_name\",\"created_at\":\"2014-04-01T04:20:02.003Z\",\"gcm_key\":\"a gcm push key\",\"id\":\"92911750-242d-4260-9e00-9d9034f139ce\",\"messageable_players\":143,\"name\":\"Your app 1\",\"players\":150,\"safari_apns_certificate\":\"Your Safari APNS certificate\",\"safari_icon_128_128\":\"http://onesignal.com/safari_packages/92911750-242d-4260-9e00-9d9034f139ce/128x128.png\",\"safari_icon_16_16\":\"http://onesignal.com/safari_packages/92911750-242d-4260-9e00-9d9034f139ce/16x16.png\",\"safari_icon_256_256\":\"http://onesignal.com/safari_packages/92911750-242d-4260-9e00-9d9034f139ce/128x128@2x.png\",\"safari_icon_32_32\":\"http://onesignal.com/safari_packages/92911750-242d-4260-9e00-9d9034f139ce/16x16@2.png\",\"safari_icon_64_64\":\"http://onesignal.com/safari_packages/92911750-242d-4260-9e00-9d9034f139ce/32x32@2x.png\",\"safari_push_id\":\"The certificate bundle ID for Safari Web Push\",\"safari_site_origin\":\"The homename for your website for Safari Push, including http or https\",\"site_name\":\"The URL to your website for Web Push\",\"updated_at\":\"2014-04-01T04:20:02.003Z\"}",
|
|
8
|
-
"headers": {}
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"body": "{\"apns_certificates\":\"Your apns certificate\",\"apns_env\":\"sandbox\",\"basic_auth_key\":\"NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj\",\"chrome_key\":\"A Chrome Web Push GCM key\",\"chrome_web_default_notification_icon\":\"http://yoursite.com/chrome_notification_icon\",\"chrome_web_gcm_sender_id\":\"Chrome Web Push GCM Sender ID\",\"chrome_web_origin\":\"Chrome Web Push Site URL\",\"chrome_web_sub_domain\":\"your_site_name\",\"created_at\":\"2014-04-01T04:20:02.003Z\",\"gcm_key\":\"a gcm push key\",\"id\":\"e4e87830-b954-11e3-811d-f3b376925f15\",\"messageable_players\":80,\"name\":\"Your app 2\",\"players\":100,\"safari_apns_certificate\":\"Your Safari APNS certificate\",\"safari_icon_128_128\":\"http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/128x128.png\",\"safari_icon_16_16\":\"http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/16x16.png\",\"safari_icon_256_256\":\"http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/128x128@2x.png\",\"safari_icon_32_32\":\"http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/16x16@2.png\",\"safari_icon_64_64\":\"http://onesignal.com/safari_packages/e4e87830-b954-11e3-811d-f3b376925f15/32x32@2x.png\",\"safari_push_id\":\"The certificate bundle ID for Safari Web Push\",\"safari_site_origin\":\"The homename for your website for Safari Push, including http or https\",\"site_name\":\"The URL to your website for Web Push\",\"updated_at\":\"2014-04-01T04:20:02.003Z\"}",
|
|
12
|
-
"headers": {}
|
|
13
|
-
}
|
|
14
|
-
]
|
|
15
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
-
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
-
import init from '../../../test/dataProvider';
|
|
4
|
-
import { NAME as ONESIGNAL_VIEW_APPS_BATCH } from '../OnesignalViewAppsBatch';
|
|
5
|
-
|
|
6
|
-
let tester: NodeTester;
|
|
7
|
-
|
|
8
|
-
describe('Tests for OnesignalViewAppsBatch', () => {
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
tester = new NodeTester(container, __filename);
|
|
11
|
-
init();
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it('process - ok', async () => {
|
|
15
|
-
await tester.testBatch(ONESIGNAL_VIEW_APPS_BATCH);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
-
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
3
|
-
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
4
|
-
|
|
5
|
-
export const NAME = 'onesignal-create-app-connector';
|
|
6
|
-
|
|
7
|
-
export default class OnesignalCreateAppConnector extends AConnector {
|
|
8
|
-
|
|
9
|
-
public getName(): string {
|
|
10
|
-
return NAME;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
public async processAction(dto: ProcessDto<IInput>): Promise<ProcessDto<IOutput>> {
|
|
14
|
-
const appInstall = await this.getApplicationInstallFromProcess(dto);
|
|
15
|
-
const req = await this.getApplication().getRequestDto(
|
|
16
|
-
dto,
|
|
17
|
-
appInstall,
|
|
18
|
-
HttpMethods.POST,
|
|
19
|
-
'apps',
|
|
20
|
-
dto.getJsonData(),
|
|
21
|
-
);
|
|
22
|
-
const resp = await this.getSender().send<IOutput>(req, [200]);
|
|
23
|
-
|
|
24
|
-
return dto.setNewJsonData(resp.getJsonBody());
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
30
|
-
export interface IInput {
|
|
31
|
-
name: string;
|
|
32
|
-
apns_env: string;
|
|
33
|
-
apns_p12: string;
|
|
34
|
-
apns_p12_password: string;
|
|
35
|
-
gcm_key: string;
|
|
36
|
-
android_gcm_sender_id: string;
|
|
37
|
-
chrome_web_origin: string;
|
|
38
|
-
chrome_web_default_notification_icon: string;
|
|
39
|
-
chrome_web_sub_domain: string;
|
|
40
|
-
chrome_key: string;
|
|
41
|
-
site_name: string;
|
|
42
|
-
safari_site_origin: string;
|
|
43
|
-
safari_apns_p12: string;
|
|
44
|
-
safari_apns_p12_password: string;
|
|
45
|
-
safari_icon_256_256: string;
|
|
46
|
-
additional_data_is_root_payload: boolean;
|
|
47
|
-
organization_id: string;
|
|
48
|
-
countent_type: string;
|
|
49
|
-
authorization: string;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface IOutput {
|
|
53
|
-
id: string;
|
|
54
|
-
name: string;
|
|
55
|
-
players: number;
|
|
56
|
-
messageable_players: number;
|
|
57
|
-
updated_at: string;
|
|
58
|
-
created_at: string;
|
|
59
|
-
gcm_key: string;
|
|
60
|
-
chrome_web_origin: string;
|
|
61
|
-
chrome_web_default_notification_icon: string;
|
|
62
|
-
chrome_web_sub_domain: string;
|
|
63
|
-
apns_env: string;
|
|
64
|
-
apns_certificates: string;
|
|
65
|
-
safari_apns_certificate: string;
|
|
66
|
-
safari_site_origin: string;
|
|
67
|
-
safari_push_id: string;
|
|
68
|
-
safari_icon_16_16: string;
|
|
69
|
-
safari_icon_32_32: string;
|
|
70
|
-
safari_icon_64_64: string;
|
|
71
|
-
safari_icon_128_128: string;
|
|
72
|
-
safari_icon_256_256: string;
|
|
73
|
-
site_name: string;
|
|
74
|
-
basic_auth_key: string;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"http": "POST https://onesignal.com/api/v1/apps",
|
|
3
|
-
"code": 200,
|
|
4
|
-
"body": {
|
|
5
|
-
"additional_data_is_root_payload": false,
|
|
6
|
-
"apns_certificates": null,
|
|
7
|
-
"apns_env": null,
|
|
8
|
-
"basic_auth_key": "NjU3YzlhMTUtMmZiNi00OTFlLTgxMjItYWU3ZjhmNTE2ZTkw",
|
|
9
|
-
"chrome_key": null,
|
|
10
|
-
"chrome_web_default_notification_icon": null,
|
|
11
|
-
"chrome_web_gcm_sender_id": null,
|
|
12
|
-
"chrome_web_key": null,
|
|
13
|
-
"chrome_web_origin": null,
|
|
14
|
-
"chrome_web_sub_domain": null,
|
|
15
|
-
"created_at": "2022-08-15T12:20:32.824Z",
|
|
16
|
-
"gcm_key": null,
|
|
17
|
-
"id": "a7fc445c-ae8f-41b6-8642-ed6ebdd7d320",
|
|
18
|
-
"messageable_players": 0,
|
|
19
|
-
"name": "karel",
|
|
20
|
-
"players": 0,
|
|
21
|
-
"safari_apns_certificate": null,
|
|
22
|
-
"safari_icon_128_128": "public/safari_packages/a7fc445c-ae8f-41b6-8642-ed6ebdd7d320/icons/128x128.png",
|
|
23
|
-
"safari_icon_16_16": "public/safari_packages/a7fc445c-ae8f-41b6-8642-ed6ebdd7d320/icons/16x16.png",
|
|
24
|
-
"safari_icon_256_256": "public/safari_packages/a7fc445c-ae8f-41b6-8642-ed6ebdd7d320/icons/128x128@2x.png",
|
|
25
|
-
"safari_icon_32_32": "public/safari_packages/a7fc445c-ae8f-41b6-8642-ed6ebdd7d320/icons/16x16@2x.png",
|
|
26
|
-
"safari_icon_64_64": "public/safari_packages/a7fc445c-ae8f-41b6-8642-ed6ebdd7d320/icons/32x32@2x.png",
|
|
27
|
-
"safari_push_id": null,
|
|
28
|
-
"safari_site_origin": null,
|
|
29
|
-
"site_name": null,
|
|
30
|
-
"updated_at": "2022-08-15T12:20:33.172Z"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"headers": {
|
|
3
|
-
"user": "TestUser"
|
|
4
|
-
},
|
|
5
|
-
"data": {
|
|
6
|
-
"additional_data_is_root_payload": false,
|
|
7
|
-
"apns_certificates": null,
|
|
8
|
-
"apns_env": null,
|
|
9
|
-
"basic_auth_key": "NjU3YzlhMTUtMmZiNi00OTFlLTgxMjItYWU3ZjhmNTE2ZTkw",
|
|
10
|
-
"chrome_key": null,
|
|
11
|
-
"chrome_web_default_notification_icon": null,
|
|
12
|
-
"chrome_web_gcm_sender_id": null,
|
|
13
|
-
"chrome_web_key": null,
|
|
14
|
-
"chrome_web_origin": null,
|
|
15
|
-
"chrome_web_sub_domain": null,
|
|
16
|
-
"created_at": "2022-08-15T12:20:32.824Z",
|
|
17
|
-
"gcm_key": null,
|
|
18
|
-
"id": "a7fc445c-ae8f-41b6-8642-ed6ebdd7d320",
|
|
19
|
-
"messageable_players": 0,
|
|
20
|
-
"name": "karel",
|
|
21
|
-
"players": 0,
|
|
22
|
-
"safari_apns_certificate": null,
|
|
23
|
-
"safari_icon_128_128": "public/safari_packages/a7fc445c-ae8f-41b6-8642-ed6ebdd7d320/icons/128x128.png",
|
|
24
|
-
"safari_icon_16_16": "public/safari_packages/a7fc445c-ae8f-41b6-8642-ed6ebdd7d320/icons/16x16.png",
|
|
25
|
-
"safari_icon_256_256": "public/safari_packages/a7fc445c-ae8f-41b6-8642-ed6ebdd7d320/icons/128x128@2x.png",
|
|
26
|
-
"safari_icon_32_32": "public/safari_packages/a7fc445c-ae8f-41b6-8642-ed6ebdd7d320/icons/16x16@2x.png",
|
|
27
|
-
"safari_icon_64_64": "public/safari_packages/a7fc445c-ae8f-41b6-8642-ed6ebdd7d320/icons/32x32@2x.png",
|
|
28
|
-
"safari_push_id": null,
|
|
29
|
-
"safari_site_origin": null,
|
|
30
|
-
"site_name": null,
|
|
31
|
-
"updated_at": "2022-08-15T12:20:33.172Z"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
-
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
-
import init from '../../../test/dataProvider';
|
|
4
|
-
import { NAME as ONESIGNAL_CREATE_APP_CONNECTOR } from '../OnesignalCreateAppConnector';
|
|
5
|
-
|
|
6
|
-
let tester: NodeTester;
|
|
7
|
-
|
|
8
|
-
describe('Tests for OnesignalCreateAppConnector', () => {
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
init();
|
|
11
|
-
tester = new NodeTester(container, __filename);
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it('process - ok', async () => {
|
|
15
|
-
await tester.testConnector(ONESIGNAL_CREATE_APP_CONNECTOR);
|
|
16
|
-
});
|
|
17
|
-
});
|