Skip to content

Commit

Permalink
Update codeowners list (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
asein-sinch authored Dec 17, 2024
1 parent db3c5db commit ce74964
Show file tree
Hide file tree
Showing 6 changed files with 718 additions and 326 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
* @asein-sinch @JPPortier @krogers0607 @Dovchik @650elx
* @asein-sinch @JPPortier @krogers0607 @Dovchik
2 changes: 1 addition & 1 deletion .github/scripts/validate-audit-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ awk 'NR > 1 {print ","} {print}' audit-report.txt >> audit-report.json
echo ']}' >> audit-report.json

# Filter JSON array to remove jest and lerna's transitive dependencies as these dependencies are not used at runtime
jq '.vulnerabilities |= map(select(.data.resolution.path | type == "string" and (startswith("lerna") or startswith("jest") or startswith("@types/jest") or startswith("babel-jest")) | not))' audit-report.json > audit-report-filtered.json
jq '.vulnerabilities |= map(select(.data.resolution.path | type == "string" and (startswith("lerna") or startswith("jest") or startswith("@types/jest") or startswith("babel-jest") or startswith("eslint") or startswith("@cucumber")) | not))' audit-report.json > audit-report-filtered.json

# Fail the build if filtered JSON array contains audit advisories
if [ "$(jq '.vulnerabilities[] | select(.type == "auditAdvisory") | .type' audit-report-filtered.json | wc -l)" -gt 0 ]; then
Expand Down
10 changes: 5 additions & 5 deletions examples/webhooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
"start:prod": "node dist/main"
},
"dependencies": {
"@nestjs/common": "^10.4.4",
"@nestjs/core": "^10.4.4",
"@nestjs/platform-express": "^10.4.4",
"@nestjs/common": "^10.4.15",
"@nestjs/core": "^10.4.15",
"@nestjs/platform-express": "^10.4.15",
"@sinch/sdk-core": "^1.2.0",
"dotenv": "^16.3.1",
"raw-body": "^2.5.2",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.8.1"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/cli": "^10.4.9",
"@nestjs/schematics": "^10.2.3",
"@types/express": "^4.17.17",
"@types/multer": "^1.4.11",
"@types/node": "^20.8.7",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"@babel/preset-typescript": "^7.24.7",
"@cucumber/cucumber": "^10.3.1",
"@cucumber/cucumber": "^11.1.1",
"@types/jest": "^29.5.13",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
Expand Down
38 changes: 38 additions & 0 deletions packages/voice/tests/rest/v1/callbacks/webhooks-events.steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,41 @@ Then('the Voice event describes a "ACE" event', () => {
assert.equal(aceEvent.custom, 'Custom text');
assert.equal(aceEvent.applicationKey, 'f00dcafe-abba-c0de-1dea-dabb1ed4caf3');
});

When('I send a request to trigger a "ICE" event', async () => {
const response = await fetch('http://localhost:3019/webhooks/voice/ice');
await processEvent(response);
});

Then('the header of the "ICE" event contains a valid authorization', () => {
assert.ok(voiceCallbackWebhooks.validateAuthenticationHeader(
formattedHeaders,
rawEvent,
'/webhooks/voice',
'POST'));
});

Then('the Voice event describes a "ICE" event', () => {
const iceEvent = event as Voice.IceRequest;
assert.equal(iceEvent.callid, '1ce0ffee-ca11-ca11-ca11-abcdef000053');
assert.equal(iceEvent.event, 'ice');
assert.deepEqual(iceEvent.timestamp, new Date('2024-06-06T17:20:14Z'));
assert.equal(iceEvent.callResourceUrl, 'https://calling-use1.api.sinch.com/calling/v1/calls/id/1ce0ffee-ca11-ca11-ca11-abcdef000053');
assert.equal(iceEvent.version, 1);
assert.equal(iceEvent.applicationKey, 'f00dcafe-abba-c0de-1dea-dabb1ed4caf3');
const price: Voice.VoicePrice = {
currencyId: 'USD',
amount: 0.0,
};
assert.deepEqual(iceEvent.userRate, price);
assert.equal(iceEvent.cli, '12015555555');
const destination: Voice.Participant = {
type: 'did',
endpoint: '+12017777777',
};
assert.deepEqual(iceEvent.to, destination);
assert.equal(iceEvent.domain, 'pstn');
assert.equal(iceEvent.originationType, 'PSTN');
assert.equal(iceEvent.rdnis, '');

});
Loading

0 comments on commit ce74964

Please sign in to comment.