@polyguard/sdk 1.0.0

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.
Files changed (87) hide show
  1. package/dist/sdk.js +11630 -0
  2. package/package.json +33 -0
  3. package/scripts/regenerate-client.sh +55 -0
  4. package/src/PolyguardClient.js +25 -0
  5. package/src/PolyguardWebsocketClientImpl.js +190 -0
  6. package/src/generated/.babelrc +33 -0
  7. package/src/generated/.openapi-generator/FILES +57 -0
  8. package/src/generated/.openapi-generator/VERSION +1 -0
  9. package/src/generated/.openapi-generator-ignore +23 -0
  10. package/src/generated/.travis.yml +5 -0
  11. package/src/generated/README.md +220 -0
  12. package/src/generated/docs/ApiControllersPslStirCallRequest.md +18 -0
  13. package/src/generated/docs/ApiModelsApiCallModelsCallRequest.md +12 -0
  14. package/src/generated/docs/AppleApi.md +88 -0
  15. package/src/generated/docs/AuthApi.md +1464 -0
  16. package/src/generated/docs/BlockingApi.md +208 -0
  17. package/src/generated/docs/CallsApi.md +140 -0
  18. package/src/generated/docs/Certainty.md +8 -0
  19. package/src/generated/docs/CreateLinkRequest.md +12 -0
  20. package/src/generated/docs/DefaultApi.md +88 -0
  21. package/src/generated/docs/HTTPValidationError.md +9 -0
  22. package/src/generated/docs/InviteRequestModel.md +10 -0
  23. package/src/generated/docs/JWTRequest.md +11 -0
  24. package/src/generated/docs/NumberVerification.md +10 -0
  25. package/src/generated/docs/StartAttestationRequest.md +9 -0
  26. package/src/generated/docs/StartMeetingRequest.md +9 -0
  27. package/src/generated/docs/StirApi.md +52 -0
  28. package/src/generated/docs/TwilioApi.md +138 -0
  29. package/src/generated/docs/UsersApi.md +362 -0
  30. package/src/generated/docs/ValidationError.md +11 -0
  31. package/src/generated/docs/ValidationErrorLocInner.md +8 -0
  32. package/src/generated/docs/VeriffApi.md +188 -0
  33. package/src/generated/docs/VeriffSessionRequest.md +10 -0
  34. package/src/generated/docs/VerifyRequest.md +10 -0
  35. package/src/generated/docs/ZoomApi.md +744 -0
  36. package/src/generated/git_push.sh +57 -0
  37. package/src/generated/mocha.opts +1 -0
  38. package/src/generated/package.json +46 -0
  39. package/src/generated/src/ApiClient.js +693 -0
  40. package/src/generated/src/api/AppleApi.js +109 -0
  41. package/src/generated/src/api/AuthApi.js +1512 -0
  42. package/src/generated/src/api/BlockingApi.js +217 -0
  43. package/src/generated/src/api/CallsApi.js +164 -0
  44. package/src/generated/src/api/DefaultApi.js +109 -0
  45. package/src/generated/src/api/StirApi.js +80 -0
  46. package/src/generated/src/api/TwilioApi.js +158 -0
  47. package/src/generated/src/api/UsersApi.js +375 -0
  48. package/src/generated/src/api/VeriffApi.js +209 -0
  49. package/src/generated/src/api/ZoomApi.js +715 -0
  50. package/src/generated/src/index.js +223 -0
  51. package/src/generated/src/model/ApiControllersPslStirCallRequest.js +211 -0
  52. package/src/generated/src/model/ApiModelsApiCallModelsCallRequest.js +119 -0
  53. package/src/generated/src/model/CreateLinkRequest.js +131 -0
  54. package/src/generated/src/model/HTTPValidationError.js +94 -0
  55. package/src/generated/src/model/InviteRequestModel.js +109 -0
  56. package/src/generated/src/model/JWTRequest.js +113 -0
  57. package/src/generated/src/model/NumberVerification.js +107 -0
  58. package/src/generated/src/model/StartAttestationRequest.js +95 -0
  59. package/src/generated/src/model/StartMeetingRequest.js +95 -0
  60. package/src/generated/src/model/ValidationError.js +130 -0
  61. package/src/generated/src/model/VeriffSessionRequest.js +107 -0
  62. package/src/generated/src/model/VerifyRequest.js +109 -0
  63. package/src/generated/test/api/AppleApi.spec.js +73 -0
  64. package/src/generated/test/api/AuthApi.spec.js +353 -0
  65. package/src/generated/test/api/BlockingApi.spec.js +103 -0
  66. package/src/generated/test/api/CallsApi.spec.js +83 -0
  67. package/src/generated/test/api/DefaultApi.spec.js +73 -0
  68. package/src/generated/test/api/StirApi.spec.js +63 -0
  69. package/src/generated/test/api/TwilioApi.spec.js +83 -0
  70. package/src/generated/test/api/UsersApi.spec.js +133 -0
  71. package/src/generated/test/api/VeriffApi.spec.js +93 -0
  72. package/src/generated/test/api/ZoomApi.spec.js +213 -0
  73. package/src/generated/test/model/ApiControllersPslStirCallRequest.spec.js +119 -0
  74. package/src/generated/test/model/ApiModelsApiCallModelsCallRequest.spec.js +83 -0
  75. package/src/generated/test/model/Certainty.spec.js +59 -0
  76. package/src/generated/test/model/CreateLinkRequest.spec.js +83 -0
  77. package/src/generated/test/model/HTTPValidationError.spec.js +65 -0
  78. package/src/generated/test/model/InviteRequestModel.spec.js +71 -0
  79. package/src/generated/test/model/JWTRequest.spec.js +77 -0
  80. package/src/generated/test/model/NumberVerification.spec.js +71 -0
  81. package/src/generated/test/model/StartAttestationRequest.spec.js +65 -0
  82. package/src/generated/test/model/StartMeetingRequest.spec.js +65 -0
  83. package/src/generated/test/model/ValidationError.spec.js +77 -0
  84. package/src/generated/test/model/ValidationErrorLocInner.spec.js +59 -0
  85. package/src/generated/test/model/VeriffSessionRequest.spec.js +71 -0
  86. package/src/generated/test/model/VerifyRequest.spec.js +71 -0
  87. package/src/index.js +20 -0
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@polyguard/sdk",
3
+ "version": "1.0.0",
4
+ "main": "dist/sdk.js",
5
+ "module": "dist/sdk.js",
6
+ "browser": "dist/sdk.js",
7
+ "scripts": {
8
+ "build": "esbuild src/index.js --bundle --outfile=dist/sdk.js",
9
+ "prepare": "npm run build",
10
+ "test": "echo \"Error: no test specified\" && exit 1",
11
+ "regenerate-client": "bash scripts/regenerate-client.sh"
12
+ },
13
+ "keywords": [],
14
+ "author": "Joshua McKenty",
15
+ "license": "ISC",
16
+ "description": "Web SDK for Polyguard",
17
+ "dependencies": {
18
+ "qrcode": "^1.5.4",
19
+ "reconnecting-websocket": "^4.4.0",
20
+ "superagent": "^8.1.2"
21
+ },
22
+ "devDependencies": {
23
+ "esbuild": "^0.21.4"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/polyguard-ai/web-sdk.git"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/polyguard-ai/web-sdk/issues"
31
+ },
32
+ "homepage": "https://github.com/polyguard-ai/web-sdk#readme"
33
+ }
@@ -0,0 +1,55 @@
1
+ #!/bin/bash
2
+
3
+ # Navigate to the script's directory
4
+ cd "$(dirname "$0")/.."
5
+
6
+ # Step 1: Download the OpenAPI specification
7
+ echo "Downloading OpenAPI specification..."
8
+ curl -o openapi.json https://api.actual.video/openapi.json
9
+
10
+ # Check if curl was successful
11
+ if [ $? -ne 0 ]; then
12
+ echo "Failed to download OpenAPI specification. Aborting."
13
+ exit 1
14
+ fi
15
+
16
+ # Step 2: Run the OpenAPI generator using Docker
17
+ echo "Generating client from OpenAPI specification..."
18
+ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
19
+ -i /local/openapi.json \
20
+ -g javascript \
21
+ -o /local/src/generated \
22
+ --skip-validate-spec \
23
+ --additional-properties=legacyDiscriminatorBehavior=false
24
+
25
+ # Check if generation was successful
26
+ if [ $? -ne 0 ]; then
27
+ echo "Client generation failed. Aborting."
28
+ rm openapi.json # Clean up downloaded spec
29
+ exit 1
30
+ fi
31
+
32
+ # Step 3: Remove problematic model files
33
+ echo "Removing problematic model files..."
34
+ rm -f src/generated/src/model/Certainty.js
35
+ rm -f src/generated/src/model/ValidationErrorLocInner.js
36
+
37
+ # Step 4: Comment out invalid import statements in generated code
38
+ echo "Patching generated files..."
39
+ find src/generated -type f -name "*.js" -print0 | xargs -0 sed -i.bak "s/import Certainty from '.\/model\/Certainty';/\/\/ import Certainty from '.\/model\/Certainty';/"
40
+ find src/generated -type f -name "*.js" -print0 | xargs -0 sed -i.bak "s/import ValidationErrorLocInner from '.\/model\/ValidationErrorLocInner';/\/\/ import ValidationErrorLocInner from '.\/model\/ValidationErrorLocInner';/"
41
+ find src/generated -type f -name "*.js" -print0 | xargs -0 sed -i.bak "s/import Certainty from '.\/Certainty';/\/\/ import Certainty from '.\/Certainty';/"
42
+ find src/generated -type f -name "*.js" -print0 | xargs -0 sed -i.bak "s/import ValidationErrorLocInner from '.\/ValidationErrorLocInner';/\/\/ import ValidationErrorLocInner from '.\/ValidationErrorLocInner';/"
43
+
44
+ # Also comment out the exports of the removed models
45
+ find src/generated -type f -name "*.js" -print0 | xargs -0 sed -i.bak "s/ Certainty,/\/\/ Certainty,/"
46
+ find src/generated -type f -name "*.js" -print0 | xargs -0 sed -i.bak "s/ ValidationErrorLocInner,/\/\/ ValidationErrorLocInner,/"
47
+
48
+ # Remove backup files created by sed
49
+ find src/generated -type f -name "*.js.bak" -delete
50
+
51
+ # Step 5: Clean up the downloaded specification file
52
+ echo "Cleaning up..."
53
+ rm openapi.json
54
+
55
+ echo "Client regeneration complete."
@@ -0,0 +1,25 @@
1
+ import { PolyguardWebsocketClientImpl } from './PolyguardWebsocketClientImpl';
2
+
3
+ export class PolyguardClient {
4
+ constructor(params = {}) {
5
+ // Choose implementation based on integrationType
6
+ let impl;
7
+ switch (params.integrationType) {
8
+ case 'websocket':
9
+ default:
10
+ impl = new PolyguardWebsocketClientImpl(params);
11
+ break;
12
+ }
13
+ this._impl = impl;
14
+ // Copy API services and properties from impl to this
15
+ for (const key in impl) {
16
+ if (Object.prototype.hasOwnProperty.call(impl, key)) {
17
+ this[key] = impl[key];
18
+ }
19
+ }
20
+ }
21
+
22
+ async verify(...args) {
23
+ return this._impl.verify(...args);
24
+ }
25
+ }
@@ -0,0 +1,190 @@
1
+ import ReconnectingWebSocket from 'reconnecting-websocket';
2
+ import * as PolyguardApi from './generated/src';
3
+ import QRCode from 'qrcode';
4
+
5
+ // Implementation class for websocket integration
6
+ export class PolyguardWebsocketClientImpl {
7
+ constructor(params = {}) {
8
+ this.apiClient = new PolyguardApi.ApiClient();
9
+ const { apiKey, baseUrl, appId, apiServer, requiredProofs = ['Full Name'], scanType = 'single', redirectUrl, callbackUrl, cookieName } = params;
10
+ if (baseUrl) {
11
+ this.apiClient.basePath = baseUrl;
12
+ }
13
+ if (apiKey) {
14
+ if (this.apiClient.authentications['bearerAuth']) {
15
+ this.apiClient.authentications['bearerAuth'].apiKey = apiKey;
16
+ }
17
+ }
18
+ // Instantiate all API services
19
+ for (const key in PolyguardApi) {
20
+ if (key.endsWith('Api')) {
21
+ const apiName = key.charAt(0).toLowerCase() + key.slice(1);
22
+ this[apiName] = new PolyguardApi[key](this.apiClient);
23
+ }
24
+ }
25
+ // Polyguard auth params
26
+ this.integrationType = 'websocket';
27
+ this.appId = appId;
28
+ this.apiServer = apiServer;
29
+ this.requiredProofs = requiredProofs;
30
+ this.scanType = scanType;
31
+ this.redirectUrl = redirectUrl;
32
+ this.callbackUrl = callbackUrl;
33
+ this.cookieName = cookieName;
34
+ }
35
+
36
+ async verify() {
37
+ // Only websocket integration is supported for modal
38
+ // Create modal DOM
39
+ const modal = document.createElement('div');
40
+ modal.style.position = 'fixed';
41
+ modal.style.top = '0';
42
+ modal.style.left = '0';
43
+ modal.style.width = '100vw';
44
+ modal.style.height = '100vh';
45
+ modal.style.background = 'rgba(0,0,0,0.45)';
46
+ modal.style.display = 'flex';
47
+ modal.style.alignItems = 'flex-start';
48
+ modal.style.justifyContent = 'center';
49
+ modal.style.overflowY = 'auto';
50
+ modal.style.paddingTop = '24px';
51
+ modal.innerHTML = `
52
+ <div id="polyguard-modal-content" style="background: #fff; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.18); padding: 32px 24px 24px 24px; max-width: 340px; width: 100%; text-align: center; position: relative; font-family: 'Inter', 'Helvetica', 'Arial', sans-serif; margin: 0 auto; box-sizing: border-box;">
53
+ <button id="polyguard-modal-close" style="position: absolute; top: 12px; right: 12px; background: none; border: none; font-size: 22px; cursor: pointer; z-index: 2;">&times;</button>
54
+ <h2 style="margin-top: 0; font-size: 1.5rem; font-weight: 700;">Quick Identity Verification</h2>
55
+ <div style="font-size: 15px; color: #888; margin-bottom: 12px; font-weight: 500;">Powered by Polyguard</div>
56
+ <div id="polyguard-qr" style="width: 200px; height: 200px; margin: 0 auto 16px auto; display: flex; align-items: center; justify-content: center; background: #f4f8fb; border-radius: 12px;"></div>
57
+ <div style="margin-bottom: 12px; font-weight: 600;">Scan this QR code to verify your identity.</div>
58
+ <ul style="text-align: left; margin: 0 0 16px 0; padding-left: 20px; font-size: 14px; color: #444;">
59
+ <li>We use the Polyguard service to verify your identity.</li>
60
+ <li>If you do not have the Polyguard app, the QR code will redirect you to download it from the App Store or Google Play.</li>
61
+ <li>Your credentials remain private on your device.</li>
62
+ </ul>
63
+ <div id="polyguard-error" style="color: #b31d28; font-size: 14px; margin-bottom: 8px; display: none;"></div>
64
+ <button id="polyguard-modal-cancel" style="background: #7be7c2; color: #222; font-weight: 600; border-radius: 8px; border: none; padding: 10px 32px; font-size: 16px; cursor: pointer; margin-top: 8px; width: 100%; max-width: 240px;">Cancel</button>
65
+ </div>
66
+ `;
67
+ document.body.appendChild(modal);
68
+ // Helper to cleanup modal
69
+ function cleanup() {
70
+ if (modal.parentNode) modal.parentNode.removeChild(modal);
71
+ }
72
+ // Promise for JWT
73
+ return new Promise(async (resolve, reject) => {
74
+ let ws = null;
75
+ let closed = false;
76
+ function showError(msg) {
77
+ const errDiv = modal.querySelector('#polyguard-error');
78
+ if (errDiv) {
79
+ errDiv.textContent = msg;
80
+ errDiv.style.display = 'block';
81
+ }
82
+ }
83
+ function clearError() {
84
+ const errDiv = modal.querySelector('#polyguard-error');
85
+ if (errDiv) errDiv.style.display = 'none';
86
+ }
87
+ // Close/cancel handler
88
+ function handleClose() {
89
+ closed = true;
90
+ if (ws) ws.close();
91
+ cleanup();
92
+ reject(new Error('User cancelled'));
93
+ }
94
+ modal.querySelector('#polyguard-modal-close').onclick = handleClose;
95
+ modal.querySelector('#polyguard-modal-cancel').onclick = handleClose;
96
+ // Start ticket/ws flow
97
+ try {
98
+ clearError();
99
+ const wsProtocol = window.location.protocol === 'https:' ? 'wss' : 'ws';
100
+ const ticketRes = await fetch(`https://${this.apiServer}/auth/ticket/${this.appId}`, {
101
+ method: 'POST',
102
+ headers: { 'Content-Type': 'application/json' },
103
+ body: JSON.stringify({ requiredProofs: this.requiredProofs }),
104
+ });
105
+ if (!ticketRes.ok) {
106
+ showError('Failed to get ticket');
107
+ return;
108
+ }
109
+ const ticketData = await ticketRes.json();
110
+ const newTicket = ticketData.ticket;
111
+ if (!newTicket) {
112
+ showError('No ticket returned from server');
113
+ return;
114
+ }
115
+ const wsUrl = `${wsProtocol}://${this.apiServer}/auth/realtime/${newTicket}`;
116
+ ws = new ReconnectingWebSocket(wsUrl);
117
+ ws.addEventListener('message', (event) => {
118
+ try {
119
+ const data = JSON.parse(event.data);
120
+ // --- BEGIN: Backend-initiated latency measurement ---
121
+ if (data && data.type === 'ping' && typeof data.seq !== 'undefined') {
122
+ ws.send(JSON.stringify({ type: 'pong', seq: data.seq }));
123
+ return;
124
+ }
125
+ // --- END: Backend-initiated latency measurement ---
126
+ if (data && data.url) {
127
+ window.location.assign(data.url);
128
+ return;
129
+ } else if (data && data.qr_url) {
130
+ console.log('qr_url', data.qr_url);
131
+ // Generate QR SVG from URL and display
132
+ const qrDiv = modal.querySelector('#polyguard-qr');
133
+ if (qrDiv) {
134
+ QRCode.toString(data.qr_url, { type: 'svg' }, (err, svg) => {
135
+ if (!err) qrDiv.innerHTML = svg;
136
+ });
137
+ }
138
+ return;
139
+ } else if (data && data.jwt) {
140
+ cleanup();
141
+ resolve(data.jwt);
142
+ ws.close();
143
+ return;
144
+ } else if (data && data.status) {
145
+ // ignore
146
+ return;
147
+ } else {
148
+ showError(`Unknown message type from server`);
149
+ }
150
+ } catch (e) {
151
+ showError('Invalid message format from server');
152
+ }
153
+ });
154
+ ws.addEventListener('error', () => {
155
+ showError('WebSocket error');
156
+ });
157
+ ws.addEventListener('close', () => {
158
+ if (!closed) cleanup();
159
+ });
160
+ } catch (err) {
161
+ showError('Failed to connect to WebSocket');
162
+ }
163
+ });
164
+ }
165
+
166
+ /**
167
+ * Wrapper around verify that checks received proof values against expected values.
168
+ * @param {Object} expectedProofs - An object mapping proof names to expected values.
169
+ * @returns {Promise<boolean>} - Resolves to true if all expected proofs match, false otherwise or if cancelled.
170
+ */
171
+ async require(expectedProofs = {}) {
172
+ try {
173
+ const jwt = await this.verify();
174
+ if (!jwt) return false;
175
+ // Decode JWT (without verifying signature)
176
+ const payload = JSON.parse(atob(jwt.split('.')[1]));
177
+ console.dir(payload);
178
+ // Check each expected proof
179
+ for (const [proof, expectedValue] of Object.entries(expectedProofs)) {
180
+ if (payload[proof] !== expectedValue) {
181
+ return false;
182
+ }
183
+ }
184
+ return true;
185
+ } catch (err) {
186
+ // If modal is cancelled or error occurs, return false
187
+ return false;
188
+ }
189
+ }
190
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "presets": [
3
+ "@babel/preset-env"
4
+ ],
5
+ "plugins": [
6
+ "@babel/plugin-syntax-dynamic-import",
7
+ "@babel/plugin-syntax-import-meta",
8
+ "@babel/plugin-proposal-class-properties",
9
+ "@babel/plugin-proposal-json-strings",
10
+ [
11
+ "@babel/plugin-proposal-decorators",
12
+ {
13
+ "legacy": true
14
+ }
15
+ ],
16
+ "@babel/plugin-proposal-function-sent",
17
+ "@babel/plugin-proposal-export-namespace-from",
18
+ "@babel/plugin-proposal-numeric-separator",
19
+ "@babel/plugin-proposal-throw-expressions",
20
+ "@babel/plugin-proposal-export-default-from",
21
+ "@babel/plugin-proposal-logical-assignment-operators",
22
+ "@babel/plugin-proposal-optional-chaining",
23
+ [
24
+ "@babel/plugin-proposal-pipeline-operator",
25
+ {
26
+ "proposal": "minimal"
27
+ }
28
+ ],
29
+ "@babel/plugin-proposal-nullish-coalescing-operator",
30
+ "@babel/plugin-proposal-do-expressions",
31
+ "@babel/plugin-proposal-function-bind"
32
+ ]
33
+ }
@@ -0,0 +1,57 @@
1
+ .babelrc
2
+ .gitignore
3
+ .travis.yml
4
+ README.md
5
+ docs/ApiControllersPslStirCallRequest.md
6
+ docs/ApiModelsApiCallModelsCallRequest.md
7
+ docs/AppleApi.md
8
+ docs/AuthApi.md
9
+ docs/BlockingApi.md
10
+ docs/CallsApi.md
11
+ docs/Certainty.md
12
+ docs/CreateLinkRequest.md
13
+ docs/DefaultApi.md
14
+ docs/HTTPValidationError.md
15
+ docs/InviteRequestModel.md
16
+ docs/JWTRequest.md
17
+ docs/NumberVerification.md
18
+ docs/StartAttestationRequest.md
19
+ docs/StartMeetingRequest.md
20
+ docs/StirApi.md
21
+ docs/TwilioApi.md
22
+ docs/UsersApi.md
23
+ docs/ValidationError.md
24
+ docs/ValidationErrorLocInner.md
25
+ docs/VeriffApi.md
26
+ docs/VeriffSessionRequest.md
27
+ docs/VerifyRequest.md
28
+ docs/ZoomApi.md
29
+ git_push.sh
30
+ mocha.opts
31
+ package.json
32
+ src/ApiClient.js
33
+ src/api/AppleApi.js
34
+ src/api/AuthApi.js
35
+ src/api/BlockingApi.js
36
+ src/api/CallsApi.js
37
+ src/api/DefaultApi.js
38
+ src/api/StirApi.js
39
+ src/api/TwilioApi.js
40
+ src/api/UsersApi.js
41
+ src/api/VeriffApi.js
42
+ src/api/ZoomApi.js
43
+ src/index.js
44
+ src/model/ApiControllersPslStirCallRequest.js
45
+ src/model/ApiModelsApiCallModelsCallRequest.js
46
+ src/model/Certainty.js
47
+ src/model/CreateLinkRequest.js
48
+ src/model/HTTPValidationError.js
49
+ src/model/InviteRequestModel.js
50
+ src/model/JWTRequest.js
51
+ src/model/NumberVerification.js
52
+ src/model/StartAttestationRequest.js
53
+ src/model/StartMeetingRequest.js
54
+ src/model/ValidationError.js
55
+ src/model/ValidationErrorLocInner.js
56
+ src/model/VeriffSessionRequest.js
57
+ src/model/VerifyRequest.js
@@ -0,0 +1 @@
1
+ 7.14.0-SNAPSHOT
@@ -0,0 +1,23 @@
1
+ # OpenAPI Generator Ignore
2
+ # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3
+
4
+ # Use this file to prevent files from being overwritten by the generator.
5
+ # The patterns follow closely to .gitignore or .dockerignore.
6
+
7
+ # As an example, the C# client generator defines ApiClient.cs.
8
+ # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9
+ #ApiClient.cs
10
+
11
+ # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
+ #foo/*/qux
13
+ # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
+
15
+ # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
+ #foo/**/qux
17
+ # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
+
19
+ # You can also negate patterns with an exclamation (!).
20
+ # For example, you can ignore all files in a docs folder with the file extension .md:
21
+ #docs/*.md
22
+ # Then explicitly reverse the ignore rule for a single file:
23
+ #!docs/README.md
@@ -0,0 +1,5 @@
1
+ language: node_js
2
+ cache: npm
3
+ node_js:
4
+ - "6"
5
+ - "6.1"
@@ -0,0 +1,220 @@
1
+ # fast_api
2
+
3
+ FastApi - JavaScript client for fast_api
4
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
6
+
7
+ - API version: 0.1.0
8
+ - Package version: 0.1.0
9
+ - Generator version: 7.14.0-SNAPSHOT
10
+ - Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
11
+
12
+ ## Installation
13
+
14
+ ### For [Node.js](https://nodejs.org/)
15
+
16
+ #### npm
17
+
18
+ To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
19
+
20
+ Then install it via:
21
+
22
+ ```shell
23
+ npm install fast_api --save
24
+ ```
25
+
26
+ Finally, you need to build the module:
27
+
28
+ ```shell
29
+ npm run build
30
+ ```
31
+
32
+ ##### Local development
33
+
34
+ To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
35
+
36
+ ```shell
37
+ npm install
38
+ ```
39
+
40
+ Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
41
+
42
+ ```shell
43
+ npm link
44
+ ```
45
+
46
+ To use the link you just defined in your project, switch to the directory you want to use your fast_api from, and run:
47
+
48
+ ```shell
49
+ npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
50
+ ```
51
+
52
+ Finally, you need to build the module:
53
+
54
+ ```shell
55
+ npm run build
56
+ ```
57
+
58
+ #### git
59
+
60
+ If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
61
+ then install it via:
62
+
63
+ ```shell
64
+ npm install GIT_USER_ID/GIT_REPO_ID --save
65
+ ```
66
+
67
+ ### For browser
68
+
69
+ The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
70
+ the above steps with Node.js and installing browserify with `npm install -g browserify`,
71
+ perform the following (assuming *main.js* is your entry file):
72
+
73
+ ```shell
74
+ browserify main.js > bundle.js
75
+ ```
76
+
77
+ Then include *bundle.js* in the HTML pages.
78
+
79
+ ### Webpack Configuration
80
+
81
+ Using Webpack you may encounter the following error: "Module not found: Error:
82
+ Cannot resolve module", most certainly you should disable AMD loader. Add/merge
83
+ the following section to your webpack config:
84
+
85
+ ```javascript
86
+ module: {
87
+ rules: [
88
+ {
89
+ parser: {
90
+ amd: false
91
+ }
92
+ }
93
+ ]
94
+ }
95
+ ```
96
+
97
+ ## Getting Started
98
+
99
+ Please follow the [installation](#installation) instruction and execute the following JS code:
100
+
101
+ ```javascript
102
+ var FastApi = require('fast_api');
103
+
104
+
105
+ var api = new FastApi.AppleApi()
106
+ var callback = function(error, data, response) {
107
+ if (error) {
108
+ console.error(error);
109
+ } else {
110
+ console.log('API called successfully. Returned data: ' + data);
111
+ }
112
+ };
113
+ api.appleAppSiteAssociationAppleAppSiteAssociationGet(callback);
114
+
115
+ ```
116
+
117
+ ## Documentation for API Endpoints
118
+
119
+ All URIs are relative to *http://localhost*
120
+
121
+ Class | Method | HTTP request | Description
122
+ ------------ | ------------- | ------------- | -------------
123
+ *FastApi.AppleApi* | [**appleAppSiteAssociationAppleAppSiteAssociationGet**](docs/AppleApi.md#appleAppSiteAssociationAppleAppSiteAssociationGet) | **GET** /apple-app-site-association | Apple App Site Association
124
+ *FastApi.AppleApi* | [**appleAppSiteAssociationWellKnownAppleAppSiteAssociationGet**](docs/AppleApi.md#appleAppSiteAssociationWellKnownAppleAppSiteAssociationGet) | **GET** /.well-known/apple-app-site-association | Apple App Site Association
125
+ *FastApi.AuthApi* | [**createTicketAuthTicketAppIdPost**](docs/AuthApi.md#createTicketAuthTicketAppIdPost) | **POST** /auth/ticket/{app_id} | Create Ticket
126
+ *FastApi.AuthApi* | [**createTicketAuthTicketAppIdPost_0**](docs/AuthApi.md#createTicketAuthTicketAppIdPost_0) | **POST** /auth/ticket/{app_id} | Create Ticket
127
+ *FastApi.AuthApi* | [**getLegacyRedirectInfoAuthRedirectAppIdLinkUuidGet**](docs/AuthApi.md#getLegacyRedirectInfoAuthRedirectAppIdLinkUuidGet) | **GET** /auth/redirect/{app_id}/{link_uuid} | Get Legacy Redirect Info
128
+ *FastApi.AuthApi* | [**getLegacyRedirectInfoAuthRedirectAppIdLinkUuidGet_0**](docs/AuthApi.md#getLegacyRedirectInfoAuthRedirectAppIdLinkUuidGet_0) | **GET** /auth/redirect/{app_id}/{link_uuid} | Get Legacy Redirect Info
129
+ *FastApi.AuthApi* | [**getRedirectInfoAuthPreviewAppIdLinkUuidGet**](docs/AuthApi.md#getRedirectInfoAuthPreviewAppIdLinkUuidGet) | **GET** /auth/preview/{app_id}/{link_uuid} | Get Redirect Info
130
+ *FastApi.AuthApi* | [**getRedirectInfoAuthPreviewAppIdLinkUuidGet_0**](docs/AuthApi.md#getRedirectInfoAuthPreviewAppIdLinkUuidGet_0) | **GET** /auth/preview/{app_id}/{link_uuid} | Get Redirect Info
131
+ *FastApi.AuthApi* | [**getSvgResponseAuthScanAppIdLinkUuidGet**](docs/AuthApi.md#getSvgResponseAuthScanAppIdLinkUuidGet) | **GET** /auth/scan/{app_id}/{link_uuid} | Get Svg Response
132
+ *FastApi.AuthApi* | [**getSvgResponseAuthScanAppIdLinkUuidGet_0**](docs/AuthApi.md#getSvgResponseAuthScanAppIdLinkUuidGet_0) | **GET** /auth/scan/{app_id}/{link_uuid} | Get Svg Response
133
+ *FastApi.AuthApi* | [**pgCompleteRedirectAuthRedirectAppIdLinkUuidPost**](docs/AuthApi.md#pgCompleteRedirectAuthRedirectAppIdLinkUuidPost) | **POST** /auth/redirect/{app_id}/{link_uuid} | Pg Complete Redirect
134
+ *FastApi.AuthApi* | [**pgCompleteRedirectAuthRedirectAppIdLinkUuidPost_0**](docs/AuthApi.md#pgCompleteRedirectAuthRedirectAppIdLinkUuidPost_0) | **POST** /auth/redirect/{app_id}/{link_uuid} | Pg Complete Redirect
135
+ *FastApi.AuthApi* | [**pgCreateLinkAuthLinkAppIdPut**](docs/AuthApi.md#pgCreateLinkAuthLinkAppIdPut) | **PUT** /auth/link/{app_id} | Pg Create Link
136
+ *FastApi.AuthApi* | [**pgCreateLinkAuthLinkAppIdPut_0**](docs/AuthApi.md#pgCreateLinkAuthLinkAppIdPut_0) | **PUT** /auth/link/{app_id} | Pg Create Link
137
+ *FastApi.AuthApi* | [**pgDeleteLinkAuthLinkAppIdLinkUuidDelete**](docs/AuthApi.md#pgDeleteLinkAuthLinkAppIdLinkUuidDelete) | **DELETE** /auth/link/{app_id}/{link_uuid} | Pg Delete Link
138
+ *FastApi.AuthApi* | [**pgDeleteLinkAuthLinkAppIdLinkUuidDelete_0**](docs/AuthApi.md#pgDeleteLinkAuthLinkAppIdLinkUuidDelete_0) | **DELETE** /auth/link/{app_id}/{link_uuid} | Pg Delete Link
139
+ *FastApi.AuthApi* | [**pgGetMeetingDetailsAuthZoomMeetingMeetingUuidGet**](docs/AuthApi.md#pgGetMeetingDetailsAuthZoomMeetingMeetingUuidGet) | **GET** /auth/zoom/meeting/{meeting_uuid} | Pg Get Meeting Details
140
+ *FastApi.AuthApi* | [**pgGetMeetingDetailsAuthZoomMeetingMeetingUuidGet_0**](docs/AuthApi.md#pgGetMeetingDetailsAuthZoomMeetingMeetingUuidGet_0) | **GET** /auth/zoom/meeting/{meeting_uuid} | Pg Get Meeting Details
141
+ *FastApi.AuthApi* | [**pgListMeetingLinksAuthListlinksAccountIdGet**](docs/AuthApi.md#pgListMeetingLinksAuthListlinksAccountIdGet) | **GET** /auth/listlinks/{account_id} | Pg List Meeting Links
142
+ *FastApi.AuthApi* | [**pgListMeetingLinksAuthListlinksAccountIdGet_0**](docs/AuthApi.md#pgListMeetingLinksAuthListlinksAccountIdGet_0) | **GET** /auth/listlinks/{account_id} | Pg List Meeting Links
143
+ *FastApi.AuthApi* | [**pgLoginAuthLinkAppIdLinkUuidGet**](docs/AuthApi.md#pgLoginAuthLinkAppIdLinkUuidGet) | **GET** /auth/link/{app_id}/{link_uuid} | Pg Login
144
+ *FastApi.AuthApi* | [**pgLoginAuthLinkAppIdLinkUuidGet_0**](docs/AuthApi.md#pgLoginAuthLinkAppIdLinkUuidGet_0) | **GET** /auth/link/{app_id}/{link_uuid} | Pg Login
145
+ *FastApi.AuthApi* | [**pgLoginMLinkUuidGet**](docs/AuthApi.md#pgLoginMLinkUuidGet) | **GET** /m/{link_uuid} | Pg Login
146
+ *FastApi.AuthApi* | [**pgLoginMLinkUuidGet_0**](docs/AuthApi.md#pgLoginMLinkUuidGet_0) | **GET** /m/{link_uuid} | Pg Login
147
+ *FastApi.AuthApi* | [**pgMobileRedirectMobileLinkUuidGet**](docs/AuthApi.md#pgMobileRedirectMobileLinkUuidGet) | **GET** /mobile/{link_uuid} | Pg Mobile Redirect
148
+ *FastApi.AuthApi* | [**pgMobileRedirectMobileLinkUuidGet_0**](docs/AuthApi.md#pgMobileRedirectMobileLinkUuidGet_0) | **GET** /mobile/{link_uuid} | Pg Mobile Redirect
149
+ *FastApi.AuthApi* | [**pgPollAuthPollPcreGet**](docs/AuthApi.md#pgPollAuthPollPcreGet) | **GET** /auth/poll/{pcre} | Pg Poll
150
+ *FastApi.AuthApi* | [**pgPollAuthPollPcreGet_0**](docs/AuthApi.md#pgPollAuthPollPcreGet_0) | **GET** /auth/poll/{pcre} | Pg Poll
151
+ *FastApi.AuthApi* | [**pgPreviewAuthRedirectAppIdLinkUuidHead**](docs/AuthApi.md#pgPreviewAuthRedirectAppIdLinkUuidHead) | **HEAD** /auth/redirect/{app_id}/{link_uuid} | Pg Preview
152
+ *FastApi.AuthApi* | [**pgPreviewAuthRedirectAppIdLinkUuidHead_0**](docs/AuthApi.md#pgPreviewAuthRedirectAppIdLinkUuidHead_0) | **HEAD** /auth/redirect/{app_id}/{link_uuid} | Pg Preview
153
+ *FastApi.AuthApi* | [**pgStartZoomMeetingAuthZoomStartAppIdLinkUuidPost**](docs/AuthApi.md#pgStartZoomMeetingAuthZoomStartAppIdLinkUuidPost) | **POST** /auth/zoom/start/{app_id}/{link_uuid} | Pg Start Zoom Meeting
154
+ *FastApi.AuthApi* | [**pgStartZoomMeetingAuthZoomStartAppIdLinkUuidPost_0**](docs/AuthApi.md#pgStartZoomMeetingAuthZoomStartAppIdLinkUuidPost_0) | **POST** /auth/zoom/start/{app_id}/{link_uuid} | Pg Start Zoom Meeting
155
+ *FastApi.BlockingApi* | [**ftcDeleteBlockingFtcDelete**](docs/BlockingApi.md#ftcDeleteBlockingFtcDelete) | **DELETE** /blocking/ftc | Ftc Delete
156
+ *FastApi.BlockingApi* | [**ftcPullBlockingFtcpullPost**](docs/BlockingApi.md#ftcPullBlockingFtcpullPost) | **POST** /blocking/ftcpull | Ftc Pull
157
+ *FastApi.BlockingApi* | [**fullReportBlockingFullreportGet**](docs/BlockingApi.md#fullReportBlockingFullreportGet) | **GET** /blocking/fullreport | Full Report
158
+ *FastApi.BlockingApi* | [**fullReportBlockingFullreportPost**](docs/BlockingApi.md#fullReportBlockingFullreportPost) | **POST** /blocking/fullreport | Full Report
159
+ *FastApi.BlockingApi* | [**fullReportHeadBlockingFullreportHead**](docs/BlockingApi.md#fullReportHeadBlockingFullreportHead) | **HEAD** /blocking/fullreport | Full Report Head
160
+ *FastApi.CallsApi* | [**cancelCallCancelCallCallIdPost**](docs/CallsApi.md#cancelCallCancelCallCallIdPost) | **POST** /cancel_call/{call_id} | Cancel Call
161
+ *FastApi.CallsApi* | [**joinCallJoinCallCallIdPost**](docs/CallsApi.md#joinCallJoinCallCallIdPost) | **POST** /join_call/{call_id} | Join Call
162
+ *FastApi.CallsApi* | [**startCallStartCallPost**](docs/CallsApi.md#startCallStartCallPost) | **POST** /start_call/ | Start Call
163
+ *FastApi.DefaultApi* | [**rootGet**](docs/DefaultApi.md#rootGet) | **GET** / | Root
164
+ *FastApi.DefaultApi* | [**rootHealthGet**](docs/DefaultApi.md#rootHealthGet) | **GET** /health | Root
165
+ *FastApi.StirApi* | [**callInitiationStirCallInitiationPost**](docs/StirApi.md#callInitiationStirCallInitiationPost) | **POST** /stir/call_initiation | Call Initiation
166
+ *FastApi.TwilioApi* | [**twilioCheckTwilioCheckPost**](docs/TwilioApi.md#twilioCheckTwilioCheckPost) | **POST** /twilio/check | Twilio Check
167
+ *FastApi.TwilioApi* | [**twilioStartTwilioStartPost**](docs/TwilioApi.md#twilioStartTwilioStartPost) | **POST** /twilio/start | Twilio Start
168
+ *FastApi.TwilioApi* | [**twilioWebhookTwilioWebhookPost**](docs/TwilioApi.md#twilioWebhookTwilioWebhookPost) | **POST** /twilio/webhook | Twilio Webhook
169
+ *FastApi.UsersApi* | [**beginAppAttestBeginAppAttestPost**](docs/UsersApi.md#beginAppAttestBeginAppAttestPost) | **POST** /begin_app_attest/ | Begin App Attest
170
+ *FastApi.UsersApi* | [**checkUpdateNeededCheckUpdateNeededPost**](docs/UsersApi.md#checkUpdateNeededCheckUpdateNeededPost) | **POST** /check_update_needed/ | Check Update Needed
171
+ *FastApi.UsersApi* | [**deleteUserDeleteUserPost**](docs/UsersApi.md#deleteUserDeleteUserPost) | **POST** /delete_user/ | Delete User
172
+ *FastApi.UsersApi* | [**fetchRegisteredUsersFetchRegisteredUsersPost**](docs/UsersApi.md#fetchRegisteredUsersFetchRegisteredUsersPost) | **POST** /fetch_registered_users/ | Fetch Registered Users
173
+ *FastApi.UsersApi* | [**inviteUserInviteUserPost**](docs/UsersApi.md#inviteUserInviteUserPost) | **POST** /invite_user/ | Invite User
174
+ *FastApi.UsersApi* | [**registerUserRegisterUserPost**](docs/UsersApi.md#registerUserRegisterUserPost) | **POST** /register_user/ | Register User
175
+ *FastApi.UsersApi* | [**updateUserUpdateUserPut**](docs/UsersApi.md#updateUserUpdateUserPut) | **PUT** /update_user/ | Update User
176
+ *FastApi.UsersApi* | [**verifyAppAttestVerifyAppPost**](docs/UsersApi.md#verifyAppAttestVerifyAppPost) | **POST** /verify_app/ | Verify App Attest
177
+ *FastApi.VeriffApi* | [**createVeriffSessionVeriffSessionPost**](docs/VeriffApi.md#createVeriffSessionVeriffSessionPost) | **POST** /veriff/session/ | Create Veriff Session
178
+ *FastApi.VeriffApi* | [**pollVeriffSessionVeriffPollSessionSessionIdPatch**](docs/VeriffApi.md#pollVeriffSessionVeriffPollSessionSessionIdPatch) | **PATCH** /veriff/poll-session/{session_id} | Poll Veriff Session
179
+ *FastApi.VeriffApi* | [**uploadVeriffMediaVeriffUploadMediaSessionIdPost**](docs/VeriffApi.md#uploadVeriffMediaVeriffUploadMediaSessionIdPost) | **POST** /veriff/upload-media/{session_id} | Upload Veriff Media
180
+ *FastApi.VeriffApi* | [**veriffWebhookVeriffWebhookPost**](docs/VeriffApi.md#veriffWebhookVeriffWebhookPost) | **POST** /veriff/webhook | Veriff Webhook
181
+ *FastApi.ZoomApi* | [**cookietestCookietestGet**](docs/ZoomApi.md#cookietestCookietestGet) | **GET** /cookietest | Cookietest
182
+ *FastApi.ZoomApi* | [**generateMeetingReportZoomPhoneReportsMeetingPost**](docs/ZoomApi.md#generateMeetingReportZoomPhoneReportsMeetingPost) | **POST** /zoom-phone/reports/meeting | Generate Meeting Report
183
+ *FastApi.ZoomApi* | [**getMeetingDetailsZoomPhoneLogsMeetingDetailsPost**](docs/ZoomApi.md#getMeetingDetailsZoomPhoneLogsMeetingDetailsPost) | **POST** /zoom-phone/logs/meeting/details | Get Meeting Details
184
+ *FastApi.ZoomApi* | [**getTicketZoomPhoneTicketAccountIdPost**](docs/ZoomApi.md#getTicketZoomPhoneTicketAccountIdPost) | **POST** /zoom-phone/ticket/{account_id} | Get Ticket
185
+ *FastApi.ZoomApi* | [**getUserLogsZoomPhoneLogsPolyUserIdGet**](docs/ZoomApi.md#getUserLogsZoomPhoneLogsPolyUserIdGet) | **GET** /zoom-phone/logs/{poly_user_id} | Get User Logs
186
+ *FastApi.ZoomApi* | [**meetingJwtMeetingjwtPost**](docs/ZoomApi.md#meetingJwtMeetingjwtPost) | **POST** /meetingjwt | Meeting Jwt
187
+ *FastApi.ZoomApi* | [**redirectToAppStoreZoomPhoneAppStoreGet**](docs/ZoomApi.md#redirectToAppStoreZoomPhoneAppStoreGet) | **GET** /zoom-phone/app-store | Redirect To App Store
188
+ *FastApi.ZoomApi* | [**redirectToMeetingReportZoomPhoneReportsMeetingEncodedS3UrlGet**](docs/ZoomApi.md#redirectToMeetingReportZoomPhoneReportsMeetingEncodedS3UrlGet) | **GET** /zoom-phone/reports/meeting/{encoded_s3_url} | Redirect To Meeting Report
189
+ *FastApi.ZoomApi* | [**testWebsocketDisconnectZoomPhoneTestDisconnectPost**](docs/ZoomApi.md#testWebsocketDisconnectZoomPhoneTestDisconnectPost) | **POST** /zoom-phone/test-disconnect | Test Websocket Disconnect
190
+ *FastApi.ZoomApi* | [**webhookWebhookPost**](docs/ZoomApi.md#webhookWebhookPost) | **POST** /webhook | Webhook
191
+ *FastApi.ZoomApi* | [**zoomCallbackZoomCallbackPost**](docs/ZoomApi.md#zoomCallbackZoomCallbackPost) | **POST** /zoom_callback | Zoom Callback
192
+ *FastApi.ZoomApi* | [**zoomInstallInstallGet**](docs/ZoomApi.md#zoomInstallInstallGet) | **GET** /install | Zoom Install
193
+ *FastApi.ZoomApi* | [**zoomInstallInstallPost**](docs/ZoomApi.md#zoomInstallInstallPost) | **POST** /install | Zoom Install
194
+ *FastApi.ZoomApi* | [**zoomPhoneInstallZoomPhoneInstallGet**](docs/ZoomApi.md#zoomPhoneInstallZoomPhoneInstallGet) | **GET** /zoom-phone/install | Zoom Phone Install
195
+ *FastApi.ZoomApi* | [**zoomPhoneInstallZoomPhoneInstallPost**](docs/ZoomApi.md#zoomPhoneInstallZoomPhoneInstallPost) | **POST** /zoom-phone/install | Zoom Phone Install
196
+ *FastApi.ZoomApi* | [**zoomWebhookZoomPhoneWebhookPost**](docs/ZoomApi.md#zoomWebhookZoomPhoneWebhookPost) | **POST** /zoom-phone/webhook | Zoom Webhook
197
+
198
+
199
+ ## Documentation for Models
200
+
201
+ - [FastApi.ApiControllersPslStirCallRequest](docs/ApiControllersPslStirCallRequest.md)
202
+ - [FastApi.ApiModelsApiCallModelsCallRequest](docs/ApiModelsApiCallModelsCallRequest.md)
203
+ - [FastApi.Certainty](docs/Certainty.md)
204
+ - [FastApi.CreateLinkRequest](docs/CreateLinkRequest.md)
205
+ - [FastApi.HTTPValidationError](docs/HTTPValidationError.md)
206
+ - [FastApi.InviteRequestModel](docs/InviteRequestModel.md)
207
+ - [FastApi.JWTRequest](docs/JWTRequest.md)
208
+ - [FastApi.NumberVerification](docs/NumberVerification.md)
209
+ - [FastApi.StartAttestationRequest](docs/StartAttestationRequest.md)
210
+ - [FastApi.StartMeetingRequest](docs/StartMeetingRequest.md)
211
+ - [FastApi.ValidationError](docs/ValidationError.md)
212
+ - [FastApi.ValidationErrorLocInner](docs/ValidationErrorLocInner.md)
213
+ - [FastApi.VeriffSessionRequest](docs/VeriffSessionRequest.md)
214
+ - [FastApi.VerifyRequest](docs/VerifyRequest.md)
215
+
216
+
217
+ ## Documentation for Authorization
218
+
219
+ Endpoints do not require authorization.
220
+