@dynamic-labs/sdk-api 0.0.229 → 0.0.230
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.
- package/package.json +1 -1
- package/src/apis/SDKApi.cjs +62 -0
- package/src/apis/SDKApi.d.ts +22 -0
- package/src/apis/SDKApi.js +62 -0
package/package.json
CHANGED
package/src/apis/SDKApi.cjs
CHANGED
|
@@ -787,6 +787,68 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
787
787
|
yield this.publishEventRaw(requestParameters, initOverrides);
|
|
788
788
|
});
|
|
789
789
|
}
|
|
790
|
+
/**
|
|
791
|
+
* Endpoint to refresh the JWT auth token using the current valid JWT auth token in the authorization header
|
|
792
|
+
*/
|
|
793
|
+
refreshAuthRaw(requestParameters, initOverrides) {
|
|
794
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
795
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
796
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling refreshAuth.');
|
|
797
|
+
}
|
|
798
|
+
const queryParameters = {};
|
|
799
|
+
const headerParameters = {};
|
|
800
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
801
|
+
const token = this.configuration.accessToken;
|
|
802
|
+
const tokenString = yield token("bearerAuth", []);
|
|
803
|
+
if (tokenString) {
|
|
804
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
const response = yield this.request({
|
|
808
|
+
path: `/sdk/{environmentId}/refresh`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
809
|
+
method: 'POST',
|
|
810
|
+
headers: headerParameters,
|
|
811
|
+
query: queryParameters,
|
|
812
|
+
}, initOverrides);
|
|
813
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VerifyResponse.VerifyResponseFromJSON(jsonValue));
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Endpoint to refresh the JWT auth token using the current valid JWT auth token in the authorization header
|
|
818
|
+
*/
|
|
819
|
+
refreshAuth(requestParameters, initOverrides) {
|
|
820
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
821
|
+
const response = yield this.refreshAuthRaw(requestParameters, initOverrides);
|
|
822
|
+
return yield response.value();
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Options call for this endpoint
|
|
827
|
+
*/
|
|
828
|
+
refreshOptionsRaw(requestParameters, initOverrides) {
|
|
829
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
830
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
831
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling refreshOptions.');
|
|
832
|
+
}
|
|
833
|
+
const queryParameters = {};
|
|
834
|
+
const headerParameters = {};
|
|
835
|
+
const response = yield this.request({
|
|
836
|
+
path: `/sdk/{environmentId}/refresh`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
837
|
+
method: 'OPTIONS',
|
|
838
|
+
headers: headerParameters,
|
|
839
|
+
query: queryParameters,
|
|
840
|
+
}, initOverrides);
|
|
841
|
+
return new runtime.VoidApiResponse(response);
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* Options call for this endpoint
|
|
846
|
+
*/
|
|
847
|
+
refreshOptions(requestParameters, initOverrides) {
|
|
848
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
849
|
+
yield this.refreshOptionsRaw(requestParameters, initOverrides);
|
|
850
|
+
});
|
|
851
|
+
}
|
|
790
852
|
/**
|
|
791
853
|
* Sends a new code for the email verification flow
|
|
792
854
|
*/
|
package/src/apis/SDKApi.d.ts
CHANGED
|
@@ -103,6 +103,12 @@ export interface PublishEventRequest {
|
|
|
103
103
|
environmentId: string;
|
|
104
104
|
publishEvents: PublishEvents;
|
|
105
105
|
}
|
|
106
|
+
export interface RefreshAuthRequest {
|
|
107
|
+
environmentId: string;
|
|
108
|
+
}
|
|
109
|
+
export interface RefreshOptionsRequest {
|
|
110
|
+
environmentId: string;
|
|
111
|
+
}
|
|
106
112
|
export interface RetryEmailVerificationRequest {
|
|
107
113
|
environmentId: string;
|
|
108
114
|
emailVerificationRetryRequest: EmailVerificationRetryRequest;
|
|
@@ -365,6 +371,22 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
365
371
|
* Publish events for SDK
|
|
366
372
|
*/
|
|
367
373
|
publishEvent(requestParameters: PublishEventRequest, initOverrides?: RequestInit): Promise<void>;
|
|
374
|
+
/**
|
|
375
|
+
* Endpoint to refresh the JWT auth token using the current valid JWT auth token in the authorization header
|
|
376
|
+
*/
|
|
377
|
+
refreshAuthRaw(requestParameters: RefreshAuthRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<VerifyResponse>>;
|
|
378
|
+
/**
|
|
379
|
+
* Endpoint to refresh the JWT auth token using the current valid JWT auth token in the authorization header
|
|
380
|
+
*/
|
|
381
|
+
refreshAuth(requestParameters: RefreshAuthRequest, initOverrides?: RequestInit): Promise<VerifyResponse>;
|
|
382
|
+
/**
|
|
383
|
+
* Options call for this endpoint
|
|
384
|
+
*/
|
|
385
|
+
refreshOptionsRaw(requestParameters: RefreshOptionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
|
|
386
|
+
/**
|
|
387
|
+
* Options call for this endpoint
|
|
388
|
+
*/
|
|
389
|
+
refreshOptions(requestParameters: RefreshOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
368
390
|
/**
|
|
369
391
|
* Sends a new code for the email verification flow
|
|
370
392
|
*/
|
package/src/apis/SDKApi.js
CHANGED
|
@@ -783,6 +783,68 @@ class SDKApi extends BaseAPI {
|
|
|
783
783
|
yield this.publishEventRaw(requestParameters, initOverrides);
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
|
+
/**
|
|
787
|
+
* Endpoint to refresh the JWT auth token using the current valid JWT auth token in the authorization header
|
|
788
|
+
*/
|
|
789
|
+
refreshAuthRaw(requestParameters, initOverrides) {
|
|
790
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
791
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
792
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling refreshAuth.');
|
|
793
|
+
}
|
|
794
|
+
const queryParameters = {};
|
|
795
|
+
const headerParameters = {};
|
|
796
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
797
|
+
const token = this.configuration.accessToken;
|
|
798
|
+
const tokenString = yield token("bearerAuth", []);
|
|
799
|
+
if (tokenString) {
|
|
800
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
const response = yield this.request({
|
|
804
|
+
path: `/sdk/{environmentId}/refresh`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
805
|
+
method: 'POST',
|
|
806
|
+
headers: headerParameters,
|
|
807
|
+
query: queryParameters,
|
|
808
|
+
}, initOverrides);
|
|
809
|
+
return new JSONApiResponse(response, (jsonValue) => VerifyResponseFromJSON(jsonValue));
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Endpoint to refresh the JWT auth token using the current valid JWT auth token in the authorization header
|
|
814
|
+
*/
|
|
815
|
+
refreshAuth(requestParameters, initOverrides) {
|
|
816
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
817
|
+
const response = yield this.refreshAuthRaw(requestParameters, initOverrides);
|
|
818
|
+
return yield response.value();
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* Options call for this endpoint
|
|
823
|
+
*/
|
|
824
|
+
refreshOptionsRaw(requestParameters, initOverrides) {
|
|
825
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
826
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
827
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling refreshOptions.');
|
|
828
|
+
}
|
|
829
|
+
const queryParameters = {};
|
|
830
|
+
const headerParameters = {};
|
|
831
|
+
const response = yield this.request({
|
|
832
|
+
path: `/sdk/{environmentId}/refresh`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
833
|
+
method: 'OPTIONS',
|
|
834
|
+
headers: headerParameters,
|
|
835
|
+
query: queryParameters,
|
|
836
|
+
}, initOverrides);
|
|
837
|
+
return new VoidApiResponse(response);
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
/**
|
|
841
|
+
* Options call for this endpoint
|
|
842
|
+
*/
|
|
843
|
+
refreshOptions(requestParameters, initOverrides) {
|
|
844
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
845
|
+
yield this.refreshOptionsRaw(requestParameters, initOverrides);
|
|
846
|
+
});
|
|
847
|
+
}
|
|
786
848
|
/**
|
|
787
849
|
* Sends a new code for the email verification flow
|
|
788
850
|
*/
|