@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
@@ -0,0 +1,130 @@
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
+ import ApiClient from '../ApiClient';
15
+ // import ValidationErrorLocInner from './ValidationErrorLocInner';
16
+
17
+ /**
18
+ * The ValidationError model module.
19
+ * @module model/ValidationError
20
+ * @version 0.1.0
21
+ */
22
+ class ValidationError {
23
+ /**
24
+ * Constructs a new <code>ValidationError</code>.
25
+ * @alias module:model/ValidationError
26
+ * @param loc {Array.<module:model/ValidationErrorLocInner>}
27
+ * @param msg {String}
28
+ * @param type {String}
29
+ */
30
+ constructor(loc, msg, type) {
31
+
32
+ ValidationError.initialize(this, loc, msg, type);
33
+ }
34
+
35
+ /**
36
+ * Initializes the fields of this object.
37
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
38
+ * Only for internal use.
39
+ */
40
+ static initialize(obj, loc, msg, type) {
41
+ obj['loc'] = loc;
42
+ obj['msg'] = msg;
43
+ obj['type'] = type;
44
+ }
45
+
46
+ /**
47
+ * Constructs a <code>ValidationError</code> from a plain JavaScript object, optionally creating a new instance.
48
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
49
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
50
+ * @param {module:model/ValidationError} obj Optional instance to populate.
51
+ * @return {module:model/ValidationError} The populated <code>ValidationError</code> instance.
52
+ */
53
+ static constructFromObject(data, obj) {
54
+ if (data) {
55
+ obj = obj || new ValidationError();
56
+
57
+ if (data.hasOwnProperty('loc')) {
58
+ obj['loc'] = ApiClient.convertToType(data['loc'], [ValidationErrorLocInner]);
59
+ }
60
+ if (data.hasOwnProperty('msg')) {
61
+ obj['msg'] = ApiClient.convertToType(data['msg'], 'String');
62
+ }
63
+ if (data.hasOwnProperty('type')) {
64
+ obj['type'] = ApiClient.convertToType(data['type'], 'String');
65
+ }
66
+ }
67
+ return obj;
68
+ }
69
+
70
+ /**
71
+ * Validates the JSON data with respect to <code>ValidationError</code>.
72
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
73
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ValidationError</code>.
74
+ */
75
+ static validateJSON(data) {
76
+ // check to make sure all required properties are present in the JSON string
77
+ for (const property of ValidationError.RequiredProperties) {
78
+ if (!data.hasOwnProperty(property)) {
79
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
80
+ }
81
+ }
82
+ if (data['loc']) { // data not null
83
+ // ensure the json data is an array
84
+ if (!Array.isArray(data['loc'])) {
85
+ throw new Error("Expected the field `loc` to be an array in the JSON data but got " + data['loc']);
86
+ }
87
+ // validate the optional field `loc` (array)
88
+ for (const item of data['loc']) {
89
+ ValidationErrorLocInner.validateJSON(item);
90
+ };
91
+ }
92
+ // ensure the json data is a string
93
+ if (data['msg'] && !(typeof data['msg'] === 'string' || data['msg'] instanceof String)) {
94
+ throw new Error("Expected the field `msg` to be a primitive type in the JSON string but got " + data['msg']);
95
+ }
96
+ // ensure the json data is a string
97
+ if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
98
+ throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
99
+ }
100
+
101
+ return true;
102
+ }
103
+
104
+
105
+ }
106
+
107
+ ValidationError.RequiredProperties = ["loc", "msg", "type"];
108
+
109
+ /**
110
+ * @member {Array.<module:model/ValidationErrorLocInner>} loc
111
+ */
112
+ ValidationError.prototype['loc'] = undefined;
113
+
114
+ /**
115
+ * @member {String} msg
116
+ */
117
+ ValidationError.prototype['msg'] = undefined;
118
+
119
+ /**
120
+ * @member {String} type
121
+ */
122
+ ValidationError.prototype['type'] = undefined;
123
+
124
+
125
+
126
+
127
+
128
+
129
+ export default ValidationError;
130
+
@@ -0,0 +1,107 @@
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
+ import ApiClient from '../ApiClient';
15
+
16
+ /**
17
+ * The VeriffSessionRequest model module.
18
+ * @module model/VeriffSessionRequest
19
+ * @version 0.1.0
20
+ */
21
+ class VeriffSessionRequest {
22
+ /**
23
+ * Constructs a new <code>VeriffSessionRequest</code>.
24
+ * @alias module:model/VeriffSessionRequest
25
+ * @param userDocument {String}
26
+ */
27
+ constructor(userDocument) {
28
+
29
+ VeriffSessionRequest.initialize(this, userDocument);
30
+ }
31
+
32
+ /**
33
+ * Initializes the fields of this object.
34
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
35
+ * Only for internal use.
36
+ */
37
+ static initialize(obj, userDocument) {
38
+ obj['user_document'] = userDocument;
39
+ }
40
+
41
+ /**
42
+ * Constructs a <code>VeriffSessionRequest</code> from a plain JavaScript object, optionally creating a new instance.
43
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
44
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
45
+ * @param {module:model/VeriffSessionRequest} obj Optional instance to populate.
46
+ * @return {module:model/VeriffSessionRequest} The populated <code>VeriffSessionRequest</code> instance.
47
+ */
48
+ static constructFromObject(data, obj) {
49
+ if (data) {
50
+ obj = obj || new VeriffSessionRequest();
51
+
52
+ if (data.hasOwnProperty('user_document')) {
53
+ obj['user_document'] = ApiClient.convertToType(data['user_document'], 'String');
54
+ }
55
+ if (data.hasOwnProperty('document_type')) {
56
+ obj['document_type'] = ApiClient.convertToType(data['document_type'], 'String');
57
+ }
58
+ }
59
+ return obj;
60
+ }
61
+
62
+ /**
63
+ * Validates the JSON data with respect to <code>VeriffSessionRequest</code>.
64
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
65
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>VeriffSessionRequest</code>.
66
+ */
67
+ static validateJSON(data) {
68
+ // check to make sure all required properties are present in the JSON string
69
+ for (const property of VeriffSessionRequest.RequiredProperties) {
70
+ if (!data.hasOwnProperty(property)) {
71
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
72
+ }
73
+ }
74
+ // ensure the json data is a string
75
+ if (data['user_document'] && !(typeof data['user_document'] === 'string' || data['user_document'] instanceof String)) {
76
+ throw new Error("Expected the field `user_document` to be a primitive type in the JSON string but got " + data['user_document']);
77
+ }
78
+ // ensure the json data is a string
79
+ if (data['document_type'] && !(typeof data['document_type'] === 'string' || data['document_type'] instanceof String)) {
80
+ throw new Error("Expected the field `document_type` to be a primitive type in the JSON string but got " + data['document_type']);
81
+ }
82
+
83
+ return true;
84
+ }
85
+
86
+
87
+ }
88
+
89
+ VeriffSessionRequest.RequiredProperties = ["user_document"];
90
+
91
+ /**
92
+ * @member {String} user_document
93
+ */
94
+ VeriffSessionRequest.prototype['user_document'] = undefined;
95
+
96
+ /**
97
+ * @member {String} document_type
98
+ */
99
+ VeriffSessionRequest.prototype['document_type'] = undefined;
100
+
101
+
102
+
103
+
104
+
105
+
106
+ export default VeriffSessionRequest;
107
+
@@ -0,0 +1,109 @@
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
+ import ApiClient from '../ApiClient';
15
+
16
+ /**
17
+ * The VerifyRequest model module.
18
+ * @module model/VerifyRequest
19
+ * @version 0.1.0
20
+ */
21
+ class VerifyRequest {
22
+ /**
23
+ * Constructs a new <code>VerifyRequest</code>.
24
+ * @alias module:model/VerifyRequest
25
+ * @param attestation {String}
26
+ * @param keyId {String}
27
+ */
28
+ constructor(attestation, keyId) {
29
+
30
+ VerifyRequest.initialize(this, attestation, keyId);
31
+ }
32
+
33
+ /**
34
+ * Initializes the fields of this object.
35
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
36
+ * Only for internal use.
37
+ */
38
+ static initialize(obj, attestation, keyId) {
39
+ obj['attestation'] = attestation;
40
+ obj['keyId'] = keyId;
41
+ }
42
+
43
+ /**
44
+ * Constructs a <code>VerifyRequest</code> from a plain JavaScript object, optionally creating a new instance.
45
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
46
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
47
+ * @param {module:model/VerifyRequest} obj Optional instance to populate.
48
+ * @return {module:model/VerifyRequest} The populated <code>VerifyRequest</code> instance.
49
+ */
50
+ static constructFromObject(data, obj) {
51
+ if (data) {
52
+ obj = obj || new VerifyRequest();
53
+
54
+ if (data.hasOwnProperty('attestation')) {
55
+ obj['attestation'] = ApiClient.convertToType(data['attestation'], 'String');
56
+ }
57
+ if (data.hasOwnProperty('keyId')) {
58
+ obj['keyId'] = ApiClient.convertToType(data['keyId'], 'String');
59
+ }
60
+ }
61
+ return obj;
62
+ }
63
+
64
+ /**
65
+ * Validates the JSON data with respect to <code>VerifyRequest</code>.
66
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
67
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>VerifyRequest</code>.
68
+ */
69
+ static validateJSON(data) {
70
+ // check to make sure all required properties are present in the JSON string
71
+ for (const property of VerifyRequest.RequiredProperties) {
72
+ if (!data.hasOwnProperty(property)) {
73
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
74
+ }
75
+ }
76
+ // ensure the json data is a string
77
+ if (data['attestation'] && !(typeof data['attestation'] === 'string' || data['attestation'] instanceof String)) {
78
+ throw new Error("Expected the field `attestation` to be a primitive type in the JSON string but got " + data['attestation']);
79
+ }
80
+ // ensure the json data is a string
81
+ if (data['keyId'] && !(typeof data['keyId'] === 'string' || data['keyId'] instanceof String)) {
82
+ throw new Error("Expected the field `keyId` to be a primitive type in the JSON string but got " + data['keyId']);
83
+ }
84
+
85
+ return true;
86
+ }
87
+
88
+
89
+ }
90
+
91
+ VerifyRequest.RequiredProperties = ["attestation", "keyId"];
92
+
93
+ /**
94
+ * @member {String} attestation
95
+ */
96
+ VerifyRequest.prototype['attestation'] = undefined;
97
+
98
+ /**
99
+ * @member {String} keyId
100
+ */
101
+ VerifyRequest.prototype['keyId'] = undefined;
102
+
103
+
104
+
105
+
106
+
107
+
108
+ export default VerifyRequest;
109
+
@@ -0,0 +1,73 @@
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
+ (function(root, factory) {
15
+ if (typeof define === 'function' && define.amd) {
16
+ // AMD.
17
+ define(['expect.js', process.cwd()+'/src/index'], factory);
18
+ } else if (typeof module === 'object' && module.exports) {
19
+ // CommonJS-like environments that support module.exports, like Node.
20
+ factory(require('expect.js'), require(process.cwd()+'/src/index'));
21
+ } else {
22
+ // Browser globals (root is window)
23
+ factory(root.expect, root.FastApi);
24
+ }
25
+ }(this, function(expect, FastApi) {
26
+ 'use strict';
27
+
28
+ var instance;
29
+
30
+ beforeEach(function() {
31
+ instance = new FastApi.AppleApi();
32
+ });
33
+
34
+ var getProperty = function(object, getter, property) {
35
+ // Use getter method if present; otherwise, get the property directly.
36
+ if (typeof object[getter] === 'function')
37
+ return object[getter]();
38
+ else
39
+ return object[property];
40
+ }
41
+
42
+ var setProperty = function(object, setter, property, value) {
43
+ // Use setter method if present; otherwise, set the property directly.
44
+ if (typeof object[setter] === 'function')
45
+ object[setter](value);
46
+ else
47
+ object[property] = value;
48
+ }
49
+
50
+ describe('AppleApi', function() {
51
+ describe('appleAppSiteAssociationAppleAppSiteAssociationGet', function() {
52
+ it('should call appleAppSiteAssociationAppleAppSiteAssociationGet successfully', function(done) {
53
+ //uncomment below and update the code to test appleAppSiteAssociationAppleAppSiteAssociationGet
54
+ //instance.appleAppSiteAssociationAppleAppSiteAssociationGet(function(error) {
55
+ // if (error) throw error;
56
+ //expect().to.be();
57
+ //});
58
+ done();
59
+ });
60
+ });
61
+ describe('appleAppSiteAssociationWellKnownAppleAppSiteAssociationGet', function() {
62
+ it('should call appleAppSiteAssociationWellKnownAppleAppSiteAssociationGet successfully', function(done) {
63
+ //uncomment below and update the code to test appleAppSiteAssociationWellKnownAppleAppSiteAssociationGet
64
+ //instance.appleAppSiteAssociationWellKnownAppleAppSiteAssociationGet(function(error) {
65
+ // if (error) throw error;
66
+ //expect().to.be();
67
+ //});
68
+ done();
69
+ });
70
+ });
71
+ });
72
+
73
+ }));