@polyguard/sdk 1.4.2 → 1.5.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.
Files changed (116) hide show
  1. package/LICENSE +200 -0
  2. package/README.md +328 -0
  3. package/dist/sdk.esm.js +16 -4
  4. package/dist/sdk.js +16 -4
  5. package/dist/server.esm.js +83 -0
  6. package/package.json +14 -3
  7. package/dist/sdk.global.js +0 -11256
  8. package/scripts/regenerate-client.sh +0 -59
  9. package/src/PolyguardClient.js +0 -25
  10. package/src/PolyguardWebsocketClientImpl.js +0 -183
  11. package/src/__tests__/PolyguardClient.test.js +0 -65
  12. package/src/__tests__/PolyguardWebsocketClientImpl.test.js +0 -574
  13. package/src/__tests__/helpers/fixtures.js +0 -27
  14. package/src/__tests__/helpers/mockWebSocket.js +0 -66
  15. package/src/__tests__/sidebar.test.js +0 -289
  16. package/src/browser.js +0 -9
  17. package/src/generated/.babelrc +0 -33
  18. package/src/generated/.openapi-generator/FILES +0 -63
  19. package/src/generated/.openapi-generator/VERSION +0 -1
  20. package/src/generated/.openapi-generator-ignore +0 -23
  21. package/src/generated/.travis.yml +0 -5
  22. package/src/generated/README.md +0 -211
  23. package/src/generated/docs/ApiControllersPslStirCallRequest.md +0 -18
  24. package/src/generated/docs/ApiModelsApiCallModelsCallRequest.md +0 -12
  25. package/src/generated/docs/AppId.md +0 -8
  26. package/src/generated/docs/AppleApi.md +0 -88
  27. package/src/generated/docs/AuthApi.md +0 -1464
  28. package/src/generated/docs/BlockingApi.md +0 -208
  29. package/src/generated/docs/CallsApi.md +0 -140
  30. package/src/generated/docs/Certainty.md +0 -8
  31. package/src/generated/docs/CreateLinkRequest.md +0 -12
  32. package/src/generated/docs/DefaultApi.md +0 -128
  33. package/src/generated/docs/HTTPValidationError.md +0 -9
  34. package/src/generated/docs/InviteRequestModel.md +0 -10
  35. package/src/generated/docs/JWTRequest.md +0 -11
  36. package/src/generated/docs/LinksApi.md +0 -162
  37. package/src/generated/docs/NumberVerification.md +0 -10
  38. package/src/generated/docs/SdkApi.md +0 -54
  39. package/src/generated/docs/SecureLinksApi.md +0 -614
  40. package/src/generated/docs/StartAttestationRequest.md +0 -9
  41. package/src/generated/docs/StartMeetingRequest.md +0 -9
  42. package/src/generated/docs/StirApi.md +0 -52
  43. package/src/generated/docs/TwilioApi.md +0 -138
  44. package/src/generated/docs/UsersApi.md +0 -362
  45. package/src/generated/docs/ValidationError.md +0 -11
  46. package/src/generated/docs/ValidationErrorLocInner.md +0 -8
  47. package/src/generated/docs/VeriffApi.md +0 -188
  48. package/src/generated/docs/VeriffSessionRequest.md +0 -10
  49. package/src/generated/docs/VerifyRequest.md +0 -10
  50. package/src/generated/docs/WellKnownApi.md +0 -128
  51. package/src/generated/docs/ZoomApi.md +0 -848
  52. package/src/generated/git_push.sh +0 -57
  53. package/src/generated/mocha.opts +0 -1
  54. package/src/generated/package.json +0 -46
  55. package/src/generated/src/ApiClient.js +0 -677
  56. package/src/generated/src/api/AppleApi.js +0 -109
  57. package/src/generated/src/api/AuthApi.js +0 -1512
  58. package/src/generated/src/api/BlockingApi.js +0 -217
  59. package/src/generated/src/api/CallsApi.js +0 -164
  60. package/src/generated/src/api/DefaultApi.js +0 -145
  61. package/src/generated/src/api/LinksApi.js +0 -195
  62. package/src/generated/src/api/SdkApi.js +0 -81
  63. package/src/generated/src/api/SecureLinksApi.js +0 -670
  64. package/src/generated/src/api/StirApi.js +0 -80
  65. package/src/generated/src/api/TwilioApi.js +0 -158
  66. package/src/generated/src/api/UsersApi.js +0 -375
  67. package/src/generated/src/api/VeriffApi.js +0 -209
  68. package/src/generated/src/api/WellKnownApi.js +0 -145
  69. package/src/generated/src/api/ZoomApi.js +0 -823
  70. package/src/generated/src/index.js +0 -244
  71. package/src/generated/src/model/ApiControllersPslStirCallRequest.js +0 -211
  72. package/src/generated/src/model/ApiModelsApiCallModelsCallRequest.js +0 -119
  73. package/src/generated/src/model/CreateLinkRequest.js +0 -131
  74. package/src/generated/src/model/HTTPValidationError.js +0 -94
  75. package/src/generated/src/model/InviteRequestModel.js +0 -109
  76. package/src/generated/src/model/JWTRequest.js +0 -113
  77. package/src/generated/src/model/NumberVerification.js +0 -107
  78. package/src/generated/src/model/StartAttestationRequest.js +0 -95
  79. package/src/generated/src/model/StartMeetingRequest.js +0 -95
  80. package/src/generated/src/model/ValidationError.js +0 -130
  81. package/src/generated/src/model/VeriffSessionRequest.js +0 -107
  82. package/src/generated/src/model/VerifyRequest.js +0 -109
  83. package/src/generated/test/api/AppleApi.spec.js +0 -73
  84. package/src/generated/test/api/AuthApi.spec.js +0 -353
  85. package/src/generated/test/api/BlockingApi.spec.js +0 -103
  86. package/src/generated/test/api/CallsApi.spec.js +0 -83
  87. package/src/generated/test/api/DefaultApi.spec.js +0 -73
  88. package/src/generated/test/api/LinksApi.spec.js +0 -83
  89. package/src/generated/test/api/SdkApi.spec.js +0 -63
  90. package/src/generated/test/api/SecureLinksApi.spec.js +0 -143
  91. package/src/generated/test/api/StirApi.spec.js +0 -63
  92. package/src/generated/test/api/TwilioApi.spec.js +0 -83
  93. package/src/generated/test/api/UsersApi.spec.js +0 -133
  94. package/src/generated/test/api/VeriffApi.spec.js +0 -93
  95. package/src/generated/test/api/WellKnownApi.spec.js +0 -83
  96. package/src/generated/test/api/ZoomApi.spec.js +0 -213
  97. package/src/generated/test/model/ApiControllersPslStirCallRequest.spec.js +0 -119
  98. package/src/generated/test/model/ApiModelsApiCallModelsCallRequest.spec.js +0 -83
  99. package/src/generated/test/model/AppId.spec.js +0 -59
  100. package/src/generated/test/model/Certainty.spec.js +0 -59
  101. package/src/generated/test/model/CreateLinkRequest.spec.js +0 -83
  102. package/src/generated/test/model/HTTPValidationError.spec.js +0 -65
  103. package/src/generated/test/model/InviteRequestModel.spec.js +0 -71
  104. package/src/generated/test/model/JWTRequest.spec.js +0 -77
  105. package/src/generated/test/model/NumberVerification.spec.js +0 -71
  106. package/src/generated/test/model/StartAttestationRequest.spec.js +0 -65
  107. package/src/generated/test/model/StartMeetingRequest.spec.js +0 -65
  108. package/src/generated/test/model/ValidationError.spec.js +0 -77
  109. package/src/generated/test/model/ValidationErrorLocInner.spec.js +0 -59
  110. package/src/generated/test/model/VeriffSessionRequest.spec.js +0 -71
  111. package/src/generated/test/model/VerifyRequest.spec.js +0 -71
  112. package/src/index.js +0 -16
  113. package/src/messageHandler.js +0 -121
  114. package/src/ticketService.js +0 -24
  115. package/src/ui.js +0 -88
  116. package/vitest.config.js +0 -10
@@ -1,195 +0,0 @@
1
- /**
2
- * FastAPI
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 0.1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- *
12
- */
13
-
14
-
15
- import ApiClient from "../ApiClient";
16
- // import AppId from '../model/AppId';
17
- import CreateLinkRequest from '../model/CreateLinkRequest';
18
- import HTTPValidationError from '../model/HTTPValidationError';
19
-
20
- /**
21
- * Links service.
22
- * @module api/LinksApi
23
- * @version 0.1.0
24
- */
25
- export default class LinksApi {
26
-
27
- /**
28
- * Constructs a new LinksApi.
29
- * @alias module:api/LinksApi
30
- * @class
31
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
32
- * default to {@link module:ApiClient#instance} if unspecified.
33
- */
34
- constructor(apiClient) {
35
- this.apiClient = apiClient || ApiClient.instance;
36
- }
37
-
38
-
39
- /**
40
- * Callback function to receive the result of the pgCreateLinkV2AppIdPut operation.
41
- * @callback module:api/LinksApi~pgCreateLinkV2AppIdPutCallback
42
- * @param {String} error Error message, if any.
43
- * @param {Object} data The data returned by the service call.
44
- * @param {String} response The complete HTTP response.
45
- */
46
-
47
- /**
48
- * Pg Create Link
49
- * @param {module:model/AppId} appId
50
- * @param {module:model/CreateLinkRequest} createLinkRequest
51
- * @param {Object} opts Optional parameters
52
- * @param {String} [clientSecret = 'ARlaFJJRMWLexEnPW4AtkCmHmerOaIGc')]
53
- * @param {String} [clientId = 'qxzT5xZCRmCDnvUqbnqHtw')]
54
- * @param {module:api/LinksApi~pgCreateLinkV2AppIdPutCallback} callback The callback function, accepting three arguments: error, data, response
55
- * data is of type: {@link Object}
56
- */
57
- pgCreateLinkV2AppIdPut(appId, createLinkRequest, opts, callback) {
58
- opts = opts || {};
59
- let postBody = createLinkRequest;
60
- // verify the required parameter 'appId' is set
61
- if (appId === undefined || appId === null) {
62
- throw new Error("Missing the required parameter 'appId' when calling pgCreateLinkV2AppIdPut");
63
- }
64
- // verify the required parameter 'createLinkRequest' is set
65
- if (createLinkRequest === undefined || createLinkRequest === null) {
66
- throw new Error("Missing the required parameter 'createLinkRequest' when calling pgCreateLinkV2AppIdPut");
67
- }
68
-
69
- let pathParams = {
70
- 'app_id': appId
71
- };
72
- let queryParams = {
73
- 'client_secret': opts['clientSecret'],
74
- 'client_id': opts['clientId']
75
- };
76
- let headerParams = {
77
- };
78
- let formParams = {
79
- };
80
-
81
- let authNames = [];
82
- let contentTypes = ['application/json'];
83
- let accepts = ['application/json'];
84
- let returnType = Object;
85
- return this.apiClient.callApi(
86
- '/v2/{app_id}', 'PUT',
87
- pathParams, queryParams, headerParams, formParams, postBody,
88
- authNames, contentTypes, accepts, returnType, null, callback
89
- );
90
- }
91
-
92
- /**
93
- * Callback function to receive the result of the pgDeleteLinkV2AppIdLinkUuidDelete operation.
94
- * @callback module:api/LinksApi~pgDeleteLinkV2AppIdLinkUuidDeleteCallback
95
- * @param {String} error Error message, if any.
96
- * @param {Object} data The data returned by the service call.
97
- * @param {String} response The complete HTTP response.
98
- */
99
-
100
- /**
101
- * Pg Delete Link
102
- * @param {String} appId
103
- * @param {String} linkUuid
104
- * @param {Object} opts Optional parameters
105
- * @param {String} [clientSecret = 'ARlaFJJRMWLexEnPW4AtkCmHmerOaIGc')]
106
- * @param {String} [clientId = 'qxzT5xZCRmCDnvUqbnqHtw')]
107
- * @param {module:api/LinksApi~pgDeleteLinkV2AppIdLinkUuidDeleteCallback} callback The callback function, accepting three arguments: error, data, response
108
- * data is of type: {@link Object}
109
- */
110
- pgDeleteLinkV2AppIdLinkUuidDelete(appId, linkUuid, opts, callback) {
111
- opts = opts || {};
112
- let postBody = null;
113
- // verify the required parameter 'appId' is set
114
- if (appId === undefined || appId === null) {
115
- throw new Error("Missing the required parameter 'appId' when calling pgDeleteLinkV2AppIdLinkUuidDelete");
116
- }
117
- // verify the required parameter 'linkUuid' is set
118
- if (linkUuid === undefined || linkUuid === null) {
119
- throw new Error("Missing the required parameter 'linkUuid' when calling pgDeleteLinkV2AppIdLinkUuidDelete");
120
- }
121
-
122
- let pathParams = {
123
- 'app_id': appId,
124
- 'link_uuid': linkUuid
125
- };
126
- let queryParams = {
127
- 'client_secret': opts['clientSecret'],
128
- 'client_id': opts['clientId']
129
- };
130
- let headerParams = {
131
- };
132
- let formParams = {
133
- };
134
-
135
- let authNames = [];
136
- let contentTypes = [];
137
- let accepts = ['application/json'];
138
- let returnType = Object;
139
- return this.apiClient.callApi(
140
- '/v2/{app_id}/{link_uuid}', 'DELETE',
141
- pathParams, queryParams, headerParams, formParams, postBody,
142
- authNames, contentTypes, accepts, returnType, null, callback
143
- );
144
- }
145
-
146
- /**
147
- * Callback function to receive the result of the pgListMeetingLinksV2ListlinksAccountIdGet operation.
148
- * @callback module:api/LinksApi~pgListMeetingLinksV2ListlinksAccountIdGetCallback
149
- * @param {String} error Error message, if any.
150
- * @param {Object} data The data returned by the service call.
151
- * @param {String} response The complete HTTP response.
152
- */
153
-
154
- /**
155
- * Pg List Meeting Links
156
- * @param {String} accountId
157
- * @param {Object} opts Optional parameters
158
- * @param {String} [clientSecret = 'ARlaFJJRMWLexEnPW4AtkCmHmerOaIGc')]
159
- * @param {String} [clientId = 'qxzT5xZCRmCDnvUqbnqHtw')]
160
- * @param {module:api/LinksApi~pgListMeetingLinksV2ListlinksAccountIdGetCallback} callback The callback function, accepting three arguments: error, data, response
161
- * data is of type: {@link Object}
162
- */
163
- pgListMeetingLinksV2ListlinksAccountIdGet(accountId, opts, callback) {
164
- opts = opts || {};
165
- let postBody = null;
166
- // verify the required parameter 'accountId' is set
167
- if (accountId === undefined || accountId === null) {
168
- throw new Error("Missing the required parameter 'accountId' when calling pgListMeetingLinksV2ListlinksAccountIdGet");
169
- }
170
-
171
- let pathParams = {
172
- 'account_id': accountId
173
- };
174
- let queryParams = {
175
- 'client_secret': opts['clientSecret'],
176
- 'client_id': opts['clientId']
177
- };
178
- let headerParams = {
179
- };
180
- let formParams = {
181
- };
182
-
183
- let authNames = [];
184
- let contentTypes = [];
185
- let accepts = ['application/json'];
186
- let returnType = Object;
187
- return this.apiClient.callApi(
188
- '/v2/listlinks/{account_id}', 'GET',
189
- pathParams, queryParams, headerParams, formParams, postBody,
190
- authNames, contentTypes, accepts, returnType, null, callback
191
- );
192
- }
193
-
194
-
195
- }
@@ -1,81 +0,0 @@
1
- /**
2
- * FastAPI
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 0.1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- *
12
- */
13
-
14
-
15
- import ApiClient from "../ApiClient";
16
- import HTTPValidationError from '../model/HTTPValidationError';
17
-
18
- /**
19
- * Sdk service.
20
- * @module api/SdkApi
21
- * @version 0.1.0
22
- */
23
- export default class SdkApi {
24
-
25
- /**
26
- * Constructs a new SdkApi.
27
- * @alias module:api/SdkApi
28
- * @class
29
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
30
- * default to {@link module:ApiClient#instance} if unspecified.
31
- */
32
- constructor(apiClient) {
33
- this.apiClient = apiClient || ApiClient.instance;
34
- }
35
-
36
-
37
- /**
38
- * Callback function to receive the result of the createTicketV2TicketAppIdPost operation.
39
- * @callback module:api/SdkApi~createTicketV2TicketAppIdPostCallback
40
- * @param {String} error Error message, if any.
41
- * @param {Object} data The data returned by the service call.
42
- * @param {String} response The complete HTTP response.
43
- */
44
-
45
- /**
46
- * Create Ticket
47
- * Issue a short-lived ticket for a given app_id and requiredProofs. The ticket is used for real-time auth via WebSocket. Stores a link object in Redis under link-{ticket} with requiredProofs and app_id.
48
- * @param {String} appId
49
- * @param {module:api/SdkApi~createTicketV2TicketAppIdPostCallback} callback The callback function, accepting three arguments: error, data, response
50
- * data is of type: {@link Object}
51
- */
52
- createTicketV2TicketAppIdPost(appId, callback) {
53
- let postBody = null;
54
- // verify the required parameter 'appId' is set
55
- if (appId === undefined || appId === null) {
56
- throw new Error("Missing the required parameter 'appId' when calling createTicketV2TicketAppIdPost");
57
- }
58
-
59
- let pathParams = {
60
- 'app_id': appId
61
- };
62
- let queryParams = {
63
- };
64
- let headerParams = {
65
- };
66
- let formParams = {
67
- };
68
-
69
- let authNames = [];
70
- let contentTypes = [];
71
- let accepts = ['application/json'];
72
- let returnType = Object;
73
- return this.apiClient.callApi(
74
- '/v2/ticket/{app_id}', 'POST',
75
- pathParams, queryParams, headerParams, formParams, postBody,
76
- authNames, contentTypes, accepts, returnType, null, callback
77
- );
78
- }
79
-
80
-
81
- }