@dynamic-labs/sdk-api 0.0.497 → 0.0.499

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-api",
3
- "version": "0.0.497",
3
+ "version": "0.0.499",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -880,6 +880,73 @@ class SDKApi extends runtime.BaseAPI {
880
880
  yield this.externalAuthSigninOptionsRaw(requestParameters, initOverrides);
881
881
  });
882
882
  }
883
+ /**
884
+ * Endpoint to verify using a token issued by an external auth provider
885
+ */
886
+ externalAuthVerifyRaw(requestParameters, initOverrides) {
887
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
888
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
889
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling externalAuthVerify.');
890
+ }
891
+ if (requestParameters.externalAuthSigninRequest === null || requestParameters.externalAuthSigninRequest === undefined) {
892
+ throw new runtime.RequiredError('externalAuthSigninRequest', 'Required parameter requestParameters.externalAuthSigninRequest was null or undefined when calling externalAuthVerify.');
893
+ }
894
+ const queryParameters = {};
895
+ const headerParameters = {};
896
+ headerParameters['Content-Type'] = 'application/json';
897
+ if (this.configuration && this.configuration.accessToken) {
898
+ const token = this.configuration.accessToken;
899
+ const tokenString = yield token("bearerAuth", []);
900
+ if (tokenString) {
901
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
902
+ }
903
+ }
904
+ const response = yield this.request({
905
+ path: `/sdk/{environmentId}/externalAuth/verify`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
906
+ method: 'POST',
907
+ headers: headerParameters,
908
+ query: queryParameters,
909
+ body: ExternalAuthSigninRequest.ExternalAuthSigninRequestToJSON(requestParameters.externalAuthSigninRequest),
910
+ }, initOverrides);
911
+ return new runtime.JSONApiResponse(response, (jsonValue) => VerifyResponse.VerifyResponseFromJSON(jsonValue));
912
+ });
913
+ }
914
+ /**
915
+ * Endpoint to verify using a token issued by an external auth provider
916
+ */
917
+ externalAuthVerify(requestParameters, initOverrides) {
918
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
919
+ const response = yield this.externalAuthVerifyRaw(requestParameters, initOverrides);
920
+ return yield response.value();
921
+ });
922
+ }
923
+ /**
924
+ * Options call for this endpoint
925
+ */
926
+ externalAuthVerifyOptionsRaw(requestParameters, initOverrides) {
927
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
928
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
929
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling externalAuthVerifyOptions.');
930
+ }
931
+ const queryParameters = {};
932
+ const headerParameters = {};
933
+ const response = yield this.request({
934
+ path: `/sdk/{environmentId}/externalAuth/verify`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
935
+ method: 'OPTIONS',
936
+ headers: headerParameters,
937
+ query: queryParameters,
938
+ }, initOverrides);
939
+ return new runtime.VoidApiResponse(response);
940
+ });
941
+ }
942
+ /**
943
+ * Options call for this endpoint
944
+ */
945
+ externalAuthVerifyOptions(requestParameters, initOverrides) {
946
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
947
+ yield this.externalAuthVerifyOptionsRaw(requestParameters, initOverrides);
948
+ });
949
+ }
883
950
  /**
884
951
  * Farcaster SignIn endpoint to exchange SIWF data
885
952
  * Farcaster provider SignIn endpoint
@@ -94,6 +94,13 @@ export interface ExternalAuthSigninOperationRequest {
94
94
  export interface ExternalAuthSigninOptionsRequest {
95
95
  environmentId: string;
96
96
  }
97
+ export interface ExternalAuthVerifyRequest {
98
+ environmentId: string;
99
+ externalAuthSigninRequest: ExternalAuthSigninRequest;
100
+ }
101
+ export interface ExternalAuthVerifyOptionsRequest {
102
+ environmentId: string;
103
+ }
97
104
  export interface FarcasterSignInOperationRequest {
98
105
  environmentId: string;
99
106
  farcasterSignInRequest?: FarcasterSignInRequest;
@@ -690,6 +697,22 @@ export declare class SDKApi extends runtime.BaseAPI {
690
697
  * Options call for this endpoint
691
698
  */
692
699
  externalAuthSigninOptions(requestParameters: ExternalAuthSigninOptionsRequest, initOverrides?: RequestInit): Promise<void>;
700
+ /**
701
+ * Endpoint to verify using a token issued by an external auth provider
702
+ */
703
+ externalAuthVerifyRaw(requestParameters: ExternalAuthVerifyRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<VerifyResponse>>;
704
+ /**
705
+ * Endpoint to verify using a token issued by an external auth provider
706
+ */
707
+ externalAuthVerify(requestParameters: ExternalAuthVerifyRequest, initOverrides?: RequestInit): Promise<VerifyResponse>;
708
+ /**
709
+ * Options call for this endpoint
710
+ */
711
+ externalAuthVerifyOptionsRaw(requestParameters: ExternalAuthVerifyOptionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
712
+ /**
713
+ * Options call for this endpoint
714
+ */
715
+ externalAuthVerifyOptions(requestParameters: ExternalAuthVerifyOptionsRequest, initOverrides?: RequestInit): Promise<void>;
693
716
  /**
694
717
  * Farcaster SignIn endpoint to exchange SIWF data
695
718
  * Farcaster provider SignIn endpoint
@@ -876,6 +876,73 @@ class SDKApi extends BaseAPI {
876
876
  yield this.externalAuthSigninOptionsRaw(requestParameters, initOverrides);
877
877
  });
878
878
  }
879
+ /**
880
+ * Endpoint to verify using a token issued by an external auth provider
881
+ */
882
+ externalAuthVerifyRaw(requestParameters, initOverrides) {
883
+ return __awaiter(this, void 0, void 0, function* () {
884
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
885
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling externalAuthVerify.');
886
+ }
887
+ if (requestParameters.externalAuthSigninRequest === null || requestParameters.externalAuthSigninRequest === undefined) {
888
+ throw new RequiredError('externalAuthSigninRequest', 'Required parameter requestParameters.externalAuthSigninRequest was null or undefined when calling externalAuthVerify.');
889
+ }
890
+ const queryParameters = {};
891
+ const headerParameters = {};
892
+ headerParameters['Content-Type'] = 'application/json';
893
+ if (this.configuration && this.configuration.accessToken) {
894
+ const token = this.configuration.accessToken;
895
+ const tokenString = yield token("bearerAuth", []);
896
+ if (tokenString) {
897
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
898
+ }
899
+ }
900
+ const response = yield this.request({
901
+ path: `/sdk/{environmentId}/externalAuth/verify`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
902
+ method: 'POST',
903
+ headers: headerParameters,
904
+ query: queryParameters,
905
+ body: ExternalAuthSigninRequestToJSON(requestParameters.externalAuthSigninRequest),
906
+ }, initOverrides);
907
+ return new JSONApiResponse(response, (jsonValue) => VerifyResponseFromJSON(jsonValue));
908
+ });
909
+ }
910
+ /**
911
+ * Endpoint to verify using a token issued by an external auth provider
912
+ */
913
+ externalAuthVerify(requestParameters, initOverrides) {
914
+ return __awaiter(this, void 0, void 0, function* () {
915
+ const response = yield this.externalAuthVerifyRaw(requestParameters, initOverrides);
916
+ return yield response.value();
917
+ });
918
+ }
919
+ /**
920
+ * Options call for this endpoint
921
+ */
922
+ externalAuthVerifyOptionsRaw(requestParameters, initOverrides) {
923
+ return __awaiter(this, void 0, void 0, function* () {
924
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
925
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling externalAuthVerifyOptions.');
926
+ }
927
+ const queryParameters = {};
928
+ const headerParameters = {};
929
+ const response = yield this.request({
930
+ path: `/sdk/{environmentId}/externalAuth/verify`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
931
+ method: 'OPTIONS',
932
+ headers: headerParameters,
933
+ query: queryParameters,
934
+ }, initOverrides);
935
+ return new VoidApiResponse(response);
936
+ });
937
+ }
938
+ /**
939
+ * Options call for this endpoint
940
+ */
941
+ externalAuthVerifyOptions(requestParameters, initOverrides) {
942
+ return __awaiter(this, void 0, void 0, function* () {
943
+ yield this.externalAuthVerifyOptionsRaw(requestParameters, initOverrides);
944
+ });
945
+ }
879
946
  /**
880
947
  * Farcaster SignIn endpoint to exchange SIWF data
881
948
  * Farcaster provider SignIn endpoint
@@ -17,6 +17,7 @@ function WebhookFromJSONTyped(json, ignoreDiscriminator) {
17
17
  'webhookId': json['webhookId'],
18
18
  'url': json['url'],
19
19
  'secret': !runtime.exists(json, 'secret') ? undefined : json['secret'],
20
+ 'version': !runtime.exists(json, 'version') ? undefined : json['version'],
20
21
  'events': json['events'],
21
22
  'isEnabled': json['isEnabled'],
22
23
  'enabledAt': !runtime.exists(json, 'enabledAt') ? undefined : (new Date(json['enabledAt'])),
@@ -36,6 +37,7 @@ function WebhookToJSON(value) {
36
37
  'webhookId': value.webhookId,
37
38
  'url': value.url,
38
39
  'secret': value.secret,
40
+ 'version': value.version,
39
41
  'events': value.events,
40
42
  'isEnabled': value.isEnabled,
41
43
  'enabledAt': value.enabledAt === undefined ? undefined : (value.enabledAt.toISOString()),
@@ -39,6 +39,12 @@ export interface Webhook {
39
39
  * @memberof Webhook
40
40
  */
41
41
  secret?: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof Webhook
46
+ */
47
+ version?: string;
42
48
  /**
43
49
  *
44
50
  * @type {Array<string>}
@@ -13,6 +13,7 @@ function WebhookFromJSONTyped(json, ignoreDiscriminator) {
13
13
  'webhookId': json['webhookId'],
14
14
  'url': json['url'],
15
15
  'secret': !exists(json, 'secret') ? undefined : json['secret'],
16
+ 'version': !exists(json, 'version') ? undefined : json['version'],
16
17
  'events': json['events'],
17
18
  'isEnabled': json['isEnabled'],
18
19
  'enabledAt': !exists(json, 'enabledAt') ? undefined : (new Date(json['enabledAt'])),
@@ -32,6 +33,7 @@ function WebhookToJSON(value) {
32
33
  'webhookId': value.webhookId,
33
34
  'url': value.url,
34
35
  'secret': value.secret,
36
+ 'version': value.version,
35
37
  'events': value.events,
36
38
  'isEnabled': value.isEnabled,
37
39
  'enabledAt': value.enabledAt === undefined ? undefined : (value.enabledAt.toISOString()),