@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,131 +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
- import ApiClient from '../ApiClient';
15
-
16
- /**
17
- * The CreateLinkRequest model module.
18
- * @module model/CreateLinkRequest
19
- * @version 0.1.0
20
- */
21
- class CreateLinkRequest {
22
- /**
23
- * Constructs a new <code>CreateLinkRequest</code>.
24
- * @alias module:model/CreateLinkRequest
25
- * @param accountId {String}
26
- */
27
- constructor(accountId) {
28
-
29
- CreateLinkRequest.initialize(this, accountId);
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, accountId) {
38
- obj['accountId'] = accountId;
39
- obj['title'] = 'Secure Meeting';
40
- obj['e2ee'] = false;
41
- }
42
-
43
- /**
44
- * Constructs a <code>CreateLinkRequest</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/CreateLinkRequest} obj Optional instance to populate.
48
- * @return {module:model/CreateLinkRequest} The populated <code>CreateLinkRequest</code> instance.
49
- */
50
- static constructFromObject(data, obj) {
51
- if (data) {
52
- obj = obj || new CreateLinkRequest();
53
-
54
- if (data.hasOwnProperty('accountId')) {
55
- obj['accountId'] = ApiClient.convertToType(data['accountId'], 'String');
56
- }
57
- if (data.hasOwnProperty('title')) {
58
- obj['title'] = ApiClient.convertToType(data['title'], 'String');
59
- }
60
- if (data.hasOwnProperty('requiredProofs')) {
61
- obj['requiredProofs'] = ApiClient.convertToType(data['requiredProofs'], ['String']);
62
- }
63
- if (data.hasOwnProperty('e2ee')) {
64
- obj['e2ee'] = ApiClient.convertToType(data['e2ee'], 'Boolean');
65
- }
66
- }
67
- return obj;
68
- }
69
-
70
- /**
71
- * Validates the JSON data with respect to <code>CreateLinkRequest</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>CreateLinkRequest</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 CreateLinkRequest.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
- // ensure the json data is a string
83
- if (data['accountId'] && !(typeof data['accountId'] === 'string' || data['accountId'] instanceof String)) {
84
- throw new Error("Expected the field `accountId` to be a primitive type in the JSON string but got " + data['accountId']);
85
- }
86
- // ensure the json data is a string
87
- if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
88
- throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
89
- }
90
- // ensure the json data is an array
91
- if (!Array.isArray(data['requiredProofs'])) {
92
- throw new Error("Expected the field `requiredProofs` to be an array in the JSON data but got " + data['requiredProofs']);
93
- }
94
-
95
- return true;
96
- }
97
-
98
-
99
- }
100
-
101
- CreateLinkRequest.RequiredProperties = ["accountId"];
102
-
103
- /**
104
- * @member {String} accountId
105
- */
106
- CreateLinkRequest.prototype['accountId'] = undefined;
107
-
108
- /**
109
- * @member {String} title
110
- * @default 'Secure Meeting'
111
- */
112
- CreateLinkRequest.prototype['title'] = 'Secure Meeting';
113
-
114
- /**
115
- * @member {Array.<String>} requiredProofs
116
- */
117
- CreateLinkRequest.prototype['requiredProofs'] = undefined;
118
-
119
- /**
120
- * @member {Boolean} e2ee
121
- * @default false
122
- */
123
- CreateLinkRequest.prototype['e2ee'] = false;
124
-
125
-
126
-
127
-
128
-
129
-
130
- export default CreateLinkRequest;
131
-
@@ -1,94 +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
- import ApiClient from '../ApiClient';
15
- import ValidationError from './ValidationError';
16
-
17
- /**
18
- * The HTTPValidationError model module.
19
- * @module model/HTTPValidationError
20
- * @version 0.1.0
21
- */
22
- class HTTPValidationError {
23
- /**
24
- * Constructs a new <code>HTTPValidationError</code>.
25
- * @alias module:model/HTTPValidationError
26
- */
27
- constructor() {
28
-
29
- HTTPValidationError.initialize(this);
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) {
38
- }
39
-
40
- /**
41
- * Constructs a <code>HTTPValidationError</code> from a plain JavaScript object, optionally creating a new instance.
42
- * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
43
- * @param {Object} data The plain JavaScript object bearing properties of interest.
44
- * @param {module:model/HTTPValidationError} obj Optional instance to populate.
45
- * @return {module:model/HTTPValidationError} The populated <code>HTTPValidationError</code> instance.
46
- */
47
- static constructFromObject(data, obj) {
48
- if (data) {
49
- obj = obj || new HTTPValidationError();
50
-
51
- if (data.hasOwnProperty('detail')) {
52
- obj['detail'] = ApiClient.convertToType(data['detail'], [ValidationError]);
53
- }
54
- }
55
- return obj;
56
- }
57
-
58
- /**
59
- * Validates the JSON data with respect to <code>HTTPValidationError</code>.
60
- * @param {Object} data The plain JavaScript object bearing properties of interest.
61
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>HTTPValidationError</code>.
62
- */
63
- static validateJSON(data) {
64
- if (data['detail']) { // data not null
65
- // ensure the json data is an array
66
- if (!Array.isArray(data['detail'])) {
67
- throw new Error("Expected the field `detail` to be an array in the JSON data but got " + data['detail']);
68
- }
69
- // validate the optional field `detail` (array)
70
- for (const item of data['detail']) {
71
- ValidationError.validateJSON(item);
72
- };
73
- }
74
-
75
- return true;
76
- }
77
-
78
-
79
- }
80
-
81
-
82
-
83
- /**
84
- * @member {Array.<module:model/ValidationError>} detail
85
- */
86
- HTTPValidationError.prototype['detail'] = undefined;
87
-
88
-
89
-
90
-
91
-
92
-
93
- export default HTTPValidationError;
94
-
@@ -1,109 +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
- import ApiClient from '../ApiClient';
15
-
16
- /**
17
- * The InviteRequestModel model module.
18
- * @module model/InviteRequestModel
19
- * @version 0.1.0
20
- */
21
- class InviteRequestModel {
22
- /**
23
- * Constructs a new <code>InviteRequestModel</code>.
24
- * @alias module:model/InviteRequestModel
25
- * @param polyUserId {String}
26
- * @param phoneNumber {String}
27
- */
28
- constructor(polyUserId, phoneNumber) {
29
-
30
- InviteRequestModel.initialize(this, polyUserId, phoneNumber);
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, polyUserId, phoneNumber) {
39
- obj['poly_user_id'] = polyUserId;
40
- obj['phone_number'] = phoneNumber;
41
- }
42
-
43
- /**
44
- * Constructs a <code>InviteRequestModel</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/InviteRequestModel} obj Optional instance to populate.
48
- * @return {module:model/InviteRequestModel} The populated <code>InviteRequestModel</code> instance.
49
- */
50
- static constructFromObject(data, obj) {
51
- if (data) {
52
- obj = obj || new InviteRequestModel();
53
-
54
- if (data.hasOwnProperty('poly_user_id')) {
55
- obj['poly_user_id'] = ApiClient.convertToType(data['poly_user_id'], 'String');
56
- }
57
- if (data.hasOwnProperty('phone_number')) {
58
- obj['phone_number'] = ApiClient.convertToType(data['phone_number'], 'String');
59
- }
60
- }
61
- return obj;
62
- }
63
-
64
- /**
65
- * Validates the JSON data with respect to <code>InviteRequestModel</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>InviteRequestModel</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 InviteRequestModel.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['poly_user_id'] && !(typeof data['poly_user_id'] === 'string' || data['poly_user_id'] instanceof String)) {
78
- throw new Error("Expected the field `poly_user_id` to be a primitive type in the JSON string but got " + data['poly_user_id']);
79
- }
80
- // ensure the json data is a string
81
- if (data['phone_number'] && !(typeof data['phone_number'] === 'string' || data['phone_number'] instanceof String)) {
82
- throw new Error("Expected the field `phone_number` to be a primitive type in the JSON string but got " + data['phone_number']);
83
- }
84
-
85
- return true;
86
- }
87
-
88
-
89
- }
90
-
91
- InviteRequestModel.RequiredProperties = ["poly_user_id", "phone_number"];
92
-
93
- /**
94
- * @member {String} poly_user_id
95
- */
96
- InviteRequestModel.prototype['poly_user_id'] = undefined;
97
-
98
- /**
99
- * @member {String} phone_number
100
- */
101
- InviteRequestModel.prototype['phone_number'] = undefined;
102
-
103
-
104
-
105
-
106
-
107
-
108
- export default InviteRequestModel;
109
-
@@ -1,113 +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
- import ApiClient from '../ApiClient';
15
-
16
- /**
17
- * The JWTRequest model module.
18
- * @module model/JWTRequest
19
- * @version 0.1.0
20
- */
21
- class JWTRequest {
22
- /**
23
- * Constructs a new <code>JWTRequest</code>.
24
- * @alias module:model/JWTRequest
25
- * @param meetingNumber {String}
26
- * @param role {Number}
27
- */
28
- constructor(meetingNumber, role) {
29
-
30
- JWTRequest.initialize(this, meetingNumber, role);
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, meetingNumber, role) {
39
- obj['meetingNumber'] = meetingNumber;
40
- obj['role'] = role;
41
- }
42
-
43
- /**
44
- * Constructs a <code>JWTRequest</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/JWTRequest} obj Optional instance to populate.
48
- * @return {module:model/JWTRequest} The populated <code>JWTRequest</code> instance.
49
- */
50
- static constructFromObject(data, obj) {
51
- if (data) {
52
- obj = obj || new JWTRequest();
53
-
54
- if (data.hasOwnProperty('meetingNumber')) {
55
- obj['meetingNumber'] = ApiClient.convertToType(data['meetingNumber'], 'String');
56
- }
57
- if (data.hasOwnProperty('role')) {
58
- obj['role'] = ApiClient.convertToType(data['role'], 'Number');
59
- }
60
- if (data.hasOwnProperty('expirationSeconds')) {
61
- obj['expirationSeconds'] = ApiClient.convertToType(data['expirationSeconds'], 'Number');
62
- }
63
- }
64
- return obj;
65
- }
66
-
67
- /**
68
- * Validates the JSON data with respect to <code>JWTRequest</code>.
69
- * @param {Object} data The plain JavaScript object bearing properties of interest.
70
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>JWTRequest</code>.
71
- */
72
- static validateJSON(data) {
73
- // check to make sure all required properties are present in the JSON string
74
- for (const property of JWTRequest.RequiredProperties) {
75
- if (!data.hasOwnProperty(property)) {
76
- throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
77
- }
78
- }
79
- // ensure the json data is a string
80
- if (data['meetingNumber'] && !(typeof data['meetingNumber'] === 'string' || data['meetingNumber'] instanceof String)) {
81
- throw new Error("Expected the field `meetingNumber` to be a primitive type in the JSON string but got " + data['meetingNumber']);
82
- }
83
-
84
- return true;
85
- }
86
-
87
-
88
- }
89
-
90
- JWTRequest.RequiredProperties = ["meetingNumber", "role"];
91
-
92
- /**
93
- * @member {String} meetingNumber
94
- */
95
- JWTRequest.prototype['meetingNumber'] = undefined;
96
-
97
- /**
98
- * @member {Number} role
99
- */
100
- JWTRequest.prototype['role'] = undefined;
101
-
102
- /**
103
- * @member {Number} expirationSeconds
104
- */
105
- JWTRequest.prototype['expirationSeconds'] = undefined;
106
-
107
-
108
-
109
-
110
-
111
-
112
- export default JWTRequest;
113
-
@@ -1,107 +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
- import ApiClient from '../ApiClient';
15
-
16
- /**
17
- * The NumberVerification model module.
18
- * @module model/NumberVerification
19
- * @version 0.1.0
20
- */
21
- class NumberVerification {
22
- /**
23
- * Constructs a new <code>NumberVerification</code>.
24
- * @alias module:model/NumberVerification
25
- * @param phoneNumber {String}
26
- */
27
- constructor(phoneNumber) {
28
-
29
- NumberVerification.initialize(this, phoneNumber);
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, phoneNumber) {
38
- obj['phone_number'] = phoneNumber;
39
- }
40
-
41
- /**
42
- * Constructs a <code>NumberVerification</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/NumberVerification} obj Optional instance to populate.
46
- * @return {module:model/NumberVerification} The populated <code>NumberVerification</code> instance.
47
- */
48
- static constructFromObject(data, obj) {
49
- if (data) {
50
- obj = obj || new NumberVerification();
51
-
52
- if (data.hasOwnProperty('phone_number')) {
53
- obj['phone_number'] = ApiClient.convertToType(data['phone_number'], 'String');
54
- }
55
- if (data.hasOwnProperty('verification_code')) {
56
- obj['verification_code'] = ApiClient.convertToType(data['verification_code'], 'String');
57
- }
58
- }
59
- return obj;
60
- }
61
-
62
- /**
63
- * Validates the JSON data with respect to <code>NumberVerification</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>NumberVerification</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 NumberVerification.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['phone_number'] && !(typeof data['phone_number'] === 'string' || data['phone_number'] instanceof String)) {
76
- throw new Error("Expected the field `phone_number` to be a primitive type in the JSON string but got " + data['phone_number']);
77
- }
78
- // ensure the json data is a string
79
- if (data['verification_code'] && !(typeof data['verification_code'] === 'string' || data['verification_code'] instanceof String)) {
80
- throw new Error("Expected the field `verification_code` to be a primitive type in the JSON string but got " + data['verification_code']);
81
- }
82
-
83
- return true;
84
- }
85
-
86
-
87
- }
88
-
89
- NumberVerification.RequiredProperties = ["phone_number"];
90
-
91
- /**
92
- * @member {String} phone_number
93
- */
94
- NumberVerification.prototype['phone_number'] = undefined;
95
-
96
- /**
97
- * @member {String} verification_code
98
- */
99
- NumberVerification.prototype['verification_code'] = undefined;
100
-
101
-
102
-
103
-
104
-
105
-
106
- export default NumberVerification;
107
-
@@ -1,95 +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
- import ApiClient from '../ApiClient';
15
-
16
- /**
17
- * The StartAttestationRequest model module.
18
- * @module model/StartAttestationRequest
19
- * @version 0.1.0
20
- */
21
- class StartAttestationRequest {
22
- /**
23
- * Constructs a new <code>StartAttestationRequest</code>.
24
- * @alias module:model/StartAttestationRequest
25
- * @param keyId {String}
26
- */
27
- constructor(keyId) {
28
-
29
- StartAttestationRequest.initialize(this, keyId);
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, keyId) {
38
- obj['keyId'] = keyId;
39
- }
40
-
41
- /**
42
- * Constructs a <code>StartAttestationRequest</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/StartAttestationRequest} obj Optional instance to populate.
46
- * @return {module:model/StartAttestationRequest} The populated <code>StartAttestationRequest</code> instance.
47
- */
48
- static constructFromObject(data, obj) {
49
- if (data) {
50
- obj = obj || new StartAttestationRequest();
51
-
52
- if (data.hasOwnProperty('keyId')) {
53
- obj['keyId'] = ApiClient.convertToType(data['keyId'], 'String');
54
- }
55
- }
56
- return obj;
57
- }
58
-
59
- /**
60
- * Validates the JSON data with respect to <code>StartAttestationRequest</code>.
61
- * @param {Object} data The plain JavaScript object bearing properties of interest.
62
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>StartAttestationRequest</code>.
63
- */
64
- static validateJSON(data) {
65
- // check to make sure all required properties are present in the JSON string
66
- for (const property of StartAttestationRequest.RequiredProperties) {
67
- if (!data.hasOwnProperty(property)) {
68
- throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
69
- }
70
- }
71
- // ensure the json data is a string
72
- if (data['keyId'] && !(typeof data['keyId'] === 'string' || data['keyId'] instanceof String)) {
73
- throw new Error("Expected the field `keyId` to be a primitive type in the JSON string but got " + data['keyId']);
74
- }
75
-
76
- return true;
77
- }
78
-
79
-
80
- }
81
-
82
- StartAttestationRequest.RequiredProperties = ["keyId"];
83
-
84
- /**
85
- * @member {String} keyId
86
- */
87
- StartAttestationRequest.prototype['keyId'] = undefined;
88
-
89
-
90
-
91
-
92
-
93
-
94
- export default StartAttestationRequest;
95
-