@fern-api/venus-api-sdk 11.3.0 → 11.4.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 (56) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/organization/client/Client.d.ts +31 -0
  3. package/dist/cjs/api/resources/organization/client/Client.js +169 -0
  4. package/dist/cjs/api/resources/organization/client/claim.d.ts +25 -0
  5. package/dist/cjs/api/resources/organization/client/claim.js +66 -0
  6. package/dist/cjs/api/resources/organization/client/index.d.ts +2 -0
  7. package/dist/cjs/api/resources/organization/client/index.js +3 -1
  8. package/dist/cjs/api/resources/organization/client/previewClaim.d.ts +25 -0
  9. package/dist/cjs/api/resources/organization/client/previewClaim.js +66 -0
  10. package/dist/cjs/api/types/ClaimOrganizationRequest.d.ts +3 -0
  11. package/dist/cjs/api/types/ClaimOrganizationRequest.js +3 -0
  12. package/dist/cjs/api/types/ClaimOrganizationResponse.d.ts +5 -0
  13. package/dist/cjs/api/types/ClaimOrganizationResponse.js +3 -0
  14. package/dist/cjs/api/types/ClaimPreviewResponse.d.ts +8 -0
  15. package/dist/cjs/api/types/ClaimPreviewResponse.js +3 -0
  16. package/dist/cjs/api/types/index.d.ts +3 -0
  17. package/dist/cjs/api/types/index.js +3 -0
  18. package/dist/cjs/serialization/types/ClaimOrganizationRequest.d.ts +9 -0
  19. package/dist/cjs/serialization/types/ClaimOrganizationRequest.js +41 -0
  20. package/dist/cjs/serialization/types/ClaimOrganizationResponse.d.ts +11 -0
  21. package/dist/cjs/serialization/types/ClaimOrganizationResponse.js +43 -0
  22. package/dist/cjs/serialization/types/ClaimPreviewResponse.d.ts +14 -0
  23. package/dist/cjs/serialization/types/ClaimPreviewResponse.js +46 -0
  24. package/dist/cjs/serialization/types/index.d.ts +3 -0
  25. package/dist/cjs/serialization/types/index.js +3 -0
  26. package/dist/cjs/version.d.ts +1 -1
  27. package/dist/cjs/version.js +1 -1
  28. package/dist/esm/BaseClient.mjs +2 -2
  29. package/dist/esm/api/resources/organization/client/Client.d.mts +31 -0
  30. package/dist/esm/api/resources/organization/client/Client.mjs +169 -0
  31. package/dist/esm/api/resources/organization/client/claim.d.mts +25 -0
  32. package/dist/esm/api/resources/organization/client/claim.mjs +30 -0
  33. package/dist/esm/api/resources/organization/client/index.d.mts +2 -0
  34. package/dist/esm/api/resources/organization/client/index.mjs +2 -0
  35. package/dist/esm/api/resources/organization/client/previewClaim.d.mts +25 -0
  36. package/dist/esm/api/resources/organization/client/previewClaim.mjs +30 -0
  37. package/dist/esm/api/types/ClaimOrganizationRequest.d.mts +3 -0
  38. package/dist/esm/api/types/ClaimOrganizationRequest.mjs +2 -0
  39. package/dist/esm/api/types/ClaimOrganizationResponse.d.mts +5 -0
  40. package/dist/esm/api/types/ClaimOrganizationResponse.mjs +2 -0
  41. package/dist/esm/api/types/ClaimPreviewResponse.d.mts +8 -0
  42. package/dist/esm/api/types/ClaimPreviewResponse.mjs +2 -0
  43. package/dist/esm/api/types/index.d.mts +3 -0
  44. package/dist/esm/api/types/index.mjs +3 -0
  45. package/dist/esm/serialization/types/ClaimOrganizationRequest.d.mts +9 -0
  46. package/dist/esm/serialization/types/ClaimOrganizationRequest.mjs +5 -0
  47. package/dist/esm/serialization/types/ClaimOrganizationResponse.d.mts +11 -0
  48. package/dist/esm/serialization/types/ClaimOrganizationResponse.mjs +7 -0
  49. package/dist/esm/serialization/types/ClaimPreviewResponse.d.mts +14 -0
  50. package/dist/esm/serialization/types/ClaimPreviewResponse.mjs +10 -0
  51. package/dist/esm/serialization/types/index.d.mts +3 -0
  52. package/dist/esm/serialization/types/index.mjs +3 -0
  53. package/dist/esm/version.d.mts +1 -1
  54. package/dist/esm/version.mjs +1 -1
  55. package/package.json +1 -1
  56. package/reference.md +135 -0
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
46
- "X-Fern-SDK-Version": "11.3.0",
47
- "User-Agent": "@fern-api/venus-api-sdk/11.3.0",
46
+ "X-Fern-SDK-Version": "11.4.0",
47
+ "User-Agent": "@fern-api/venus-api-sdk/11.4.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -119,6 +119,37 @@ export declare class OrganizationClient {
119
119
  */
120
120
  createClaimToken(request: FernVenusApi.CreateClaimTokenRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.ClaimTokenResponse, FernVenusApi.organization.createClaimToken.Error>>;
121
121
  private __createClaimToken;
122
+ /**
123
+ * Redeems a claim link. The caller, signed in as the Postman user the link
124
+ * is for, becomes the admin of the organization. The first claim wins, and
125
+ * a retry by the same user finishes a claim that failed partway.
126
+ *
127
+ * @param {FernVenusApi.ClaimOrganizationRequest} request
128
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
129
+ *
130
+ * @example
131
+ * await client.organization.claim({
132
+ * claimToken: "claimToken"
133
+ * })
134
+ */
135
+ claim(request: FernVenusApi.ClaimOrganizationRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.ClaimOrganizationResponse, FernVenusApi.organization.claim.Error>>;
136
+ private __claim;
137
+ /**
138
+ * What a claim link is for, without redeeming it, so the dashboard can show
139
+ * the organization and the link's state before the user signs in. Public:
140
+ * the link is the secret. The token is in the body to keep it out of
141
+ * request logs.
142
+ *
143
+ * @param {FernVenusApi.ClaimOrganizationRequest} request
144
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
145
+ *
146
+ * @example
147
+ * await client.organization.previewClaim({
148
+ * claimToken: "claimToken"
149
+ * })
150
+ */
151
+ previewClaim(request: FernVenusApi.ClaimOrganizationRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.ClaimPreviewResponse, FernVenusApi.organization.previewClaim.Error>>;
152
+ private __previewClaim;
122
153
  /**
123
154
  * @param {FernVenusApi.IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest} request
124
155
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -693,6 +693,175 @@ class OrganizationClient {
693
693
  };
694
694
  });
695
695
  }
696
+ /**
697
+ * Redeems a claim link. The caller, signed in as the Postman user the link
698
+ * is for, becomes the admin of the organization. The first claim wins, and
699
+ * a retry by the same user finishes a claim that failed partway.
700
+ *
701
+ * @param {FernVenusApi.ClaimOrganizationRequest} request
702
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
703
+ *
704
+ * @example
705
+ * await client.organization.claim({
706
+ * claimToken: "claimToken"
707
+ * })
708
+ */
709
+ claim(request, requestOptions) {
710
+ return core.HttpResponsePromise.fromPromise(this.__claim(request, requestOptions));
711
+ }
712
+ __claim(request, requestOptions) {
713
+ return __awaiter(this, void 0, void 0, function* () {
714
+ var _a, _b, _c, _d, _e, _f, _g, _h;
715
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
716
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
717
+ const _response = yield core.fetcher({
718
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations/claim"),
719
+ method: "POST",
720
+ headers: _headers,
721
+ contentType: "application/json",
722
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
723
+ requestType: "json",
724
+ body: serializers.ClaimOrganizationRequest.jsonOrThrow(request, {
725
+ unrecognizedObjectKeys: "strip",
726
+ omitUndefined: true,
727
+ }),
728
+ timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
729
+ maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
730
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
731
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
732
+ logging: this._options.logging,
733
+ });
734
+ if (_response.ok) {
735
+ return {
736
+ data: {
737
+ ok: true,
738
+ body: serializers.ClaimOrganizationResponse.parseOrThrow(_response.body, {
739
+ unrecognizedObjectKeys: "passthrough",
740
+ allowUnrecognizedUnionMembers: true,
741
+ allowUnrecognizedEnumValues: true,
742
+ skipValidation: true,
743
+ breadcrumbsPrefix: ["response"],
744
+ }),
745
+ headers: _response.headers,
746
+ rawResponse: _response.rawResponse,
747
+ },
748
+ rawResponse: _response.rawResponse,
749
+ };
750
+ }
751
+ if (_response.error.reason === "status-code") {
752
+ switch (_response.error.statusCode) {
753
+ case 422:
754
+ return {
755
+ data: {
756
+ ok: false,
757
+ error: FernVenusApi.organization.claim.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
758
+ unrecognizedObjectKeys: "passthrough",
759
+ allowUnrecognizedUnionMembers: true,
760
+ allowUnrecognizedEnumValues: true,
761
+ skipValidation: true,
762
+ breadcrumbsPrefix: ["response"],
763
+ })),
764
+ rawResponse: _response.rawResponse,
765
+ },
766
+ rawResponse: _response.rawResponse,
767
+ };
768
+ }
769
+ }
770
+ return {
771
+ data: {
772
+ ok: false,
773
+ error: FernVenusApi.organization.claim.Error._unknown(_response.error),
774
+ rawResponse: _response.rawResponse,
775
+ },
776
+ rawResponse: _response.rawResponse,
777
+ };
778
+ });
779
+ }
780
+ /**
781
+ * What a claim link is for, without redeeming it, so the dashboard can show
782
+ * the organization and the link's state before the user signs in. Public:
783
+ * the link is the secret. The token is in the body to keep it out of
784
+ * request logs.
785
+ *
786
+ * @param {FernVenusApi.ClaimOrganizationRequest} request
787
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
788
+ *
789
+ * @example
790
+ * await client.organization.previewClaim({
791
+ * claimToken: "claimToken"
792
+ * })
793
+ */
794
+ previewClaim(request, requestOptions) {
795
+ return core.HttpResponsePromise.fromPromise(this.__previewClaim(request, requestOptions));
796
+ }
797
+ __previewClaim(request, requestOptions) {
798
+ return __awaiter(this, void 0, void 0, function* () {
799
+ var _a, _b, _c, _d, _e, _f, _g, _h;
800
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
801
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
802
+ const _response = yield core.fetcher({
803
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "organizations/claim/preview"),
804
+ method: "POST",
805
+ headers: _headers,
806
+ contentType: "application/json",
807
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
808
+ requestType: "json",
809
+ body: serializers.ClaimOrganizationRequest.jsonOrThrow(request, {
810
+ unrecognizedObjectKeys: "strip",
811
+ omitUndefined: true,
812
+ }),
813
+ timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
814
+ maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
815
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
816
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
817
+ logging: this._options.logging,
818
+ });
819
+ if (_response.ok) {
820
+ return {
821
+ data: {
822
+ ok: true,
823
+ body: serializers.ClaimPreviewResponse.parseOrThrow(_response.body, {
824
+ unrecognizedObjectKeys: "passthrough",
825
+ allowUnrecognizedUnionMembers: true,
826
+ allowUnrecognizedEnumValues: true,
827
+ skipValidation: true,
828
+ breadcrumbsPrefix: ["response"],
829
+ }),
830
+ headers: _response.headers,
831
+ rawResponse: _response.rawResponse,
832
+ },
833
+ rawResponse: _response.rawResponse,
834
+ };
835
+ }
836
+ if (_response.error.reason === "status-code") {
837
+ switch (_response.error.statusCode) {
838
+ case 422:
839
+ return {
840
+ data: {
841
+ ok: false,
842
+ error: FernVenusApi.organization.previewClaim.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
843
+ unrecognizedObjectKeys: "passthrough",
844
+ allowUnrecognizedUnionMembers: true,
845
+ allowUnrecognizedEnumValues: true,
846
+ skipValidation: true,
847
+ breadcrumbsPrefix: ["response"],
848
+ })),
849
+ rawResponse: _response.rawResponse,
850
+ },
851
+ rawResponse: _response.rawResponse,
852
+ };
853
+ }
854
+ }
855
+ return {
856
+ data: {
857
+ ok: false,
858
+ error: FernVenusApi.organization.previewClaim.Error._unknown(_response.error),
859
+ rawResponse: _response.rawResponse,
860
+ },
861
+ rawResponse: _response.rawResponse,
862
+ };
863
+ });
864
+ }
696
865
  /**
697
866
  * @param {FernVenusApi.IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest} request
698
867
  * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -0,0 +1,25 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as FernVenusApi from "../../../index.js";
3
+ export type Error = FernVenusApi.organization.claim.Error.UnprocessableEntityError | FernVenusApi.organization.claim.Error._Unknown;
4
+ export declare namespace Error {
5
+ interface UnprocessableEntityError extends _Utils {
6
+ statusCode: 422;
7
+ content: FernVenusApi.HttpValidationError;
8
+ }
9
+ interface _Unknown extends _Utils {
10
+ statusCode: void;
11
+ content: core.Fetcher.Error;
12
+ }
13
+ interface _Utils {
14
+ _visit: <_Result>(visitor: FernVenusApi.organization.claim.Error._Visitor<_Result>) => _Result;
15
+ }
16
+ interface _Visitor<_Result> {
17
+ unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => _Result;
18
+ _other: (value: core.Fetcher.Error) => _Result;
19
+ }
20
+ }
21
+ export declare const Error: {
22
+ readonly unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => FernVenusApi.organization.claim.Error.UnprocessableEntityError;
23
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.organization.claim.Error._Unknown;
24
+ readonly _visit: <_Result>(value: FernVenusApi.organization.claim.Error, visitor: FernVenusApi.organization.claim.Error._Visitor<_Result>) => _Result;
25
+ };
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.Error = void 0;
38
+ const FernVenusApi = __importStar(require("../../../index.js"));
39
+ exports.Error = {
40
+ unprocessableEntityError: (value) => {
41
+ return {
42
+ content: value,
43
+ statusCode: 422,
44
+ _visit: function (visitor) {
45
+ return FernVenusApi.organization.claim.Error._visit(this, visitor);
46
+ },
47
+ };
48
+ },
49
+ _unknown: (fetcherError) => {
50
+ return {
51
+ statusCode: undefined,
52
+ content: fetcherError,
53
+ _visit: function (visitor) {
54
+ return FernVenusApi.organization.claim.Error._visit(this, visitor);
55
+ },
56
+ };
57
+ },
58
+ _visit: (value, visitor) => {
59
+ switch (value.statusCode) {
60
+ case 422:
61
+ return visitor.unprocessableEntityError(value.content);
62
+ default:
63
+ return visitor._other(value.content);
64
+ }
65
+ },
66
+ };
@@ -1,4 +1,5 @@
1
1
  export * as addUser from "./addUser.js";
2
+ export * as claim from "./claim.js";
2
3
  export * as create from "./create.js";
3
4
  export * as createClaimToken from "./createClaimToken.js";
4
5
  export * as delete from "./delete.js";
@@ -10,6 +11,7 @@ export * as getOrgIdsFromToken from "./getOrgIdsFromToken.js";
10
11
  export * as getPostmanTeamIdByOrgId from "./getPostmanTeamIdByOrgId.js";
11
12
  export * as inviteUser from "./inviteUser.js";
12
13
  export * as isMember from "./isMember.js";
14
+ export * as previewClaim from "./previewClaim.js";
13
15
  export * as removeUser from "./removeUser.js";
14
16
  export * from "./requests/index.js";
15
17
  export * as update from "./update.js";
@@ -36,8 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.update = exports.removeUser = exports.isMember = exports.inviteUser = exports.getPostmanTeamIdByOrgId = exports.getOrgIdsFromToken = exports.getOrgIdsByPostmanTeamId = exports.getMyOrganizationFromScopedToken = exports.getClaimStatus = exports.get = exports.delete = exports.createClaimToken = exports.create = exports.addUser = void 0;
39
+ exports.update = exports.removeUser = exports.previewClaim = exports.isMember = exports.inviteUser = exports.getPostmanTeamIdByOrgId = exports.getOrgIdsFromToken = exports.getOrgIdsByPostmanTeamId = exports.getMyOrganizationFromScopedToken = exports.getClaimStatus = exports.get = exports.delete = exports.createClaimToken = exports.create = exports.claim = exports.addUser = void 0;
40
40
  exports.addUser = __importStar(require("./addUser.js"));
41
+ exports.claim = __importStar(require("./claim.js"));
41
42
  exports.create = __importStar(require("./create.js"));
42
43
  exports.createClaimToken = __importStar(require("./createClaimToken.js"));
43
44
  exports.delete = __importStar(require("./delete.js"));
@@ -49,6 +50,7 @@ exports.getOrgIdsFromToken = __importStar(require("./getOrgIdsFromToken.js"));
49
50
  exports.getPostmanTeamIdByOrgId = __importStar(require("./getPostmanTeamIdByOrgId.js"));
50
51
  exports.inviteUser = __importStar(require("./inviteUser.js"));
51
52
  exports.isMember = __importStar(require("./isMember.js"));
53
+ exports.previewClaim = __importStar(require("./previewClaim.js"));
52
54
  exports.removeUser = __importStar(require("./removeUser.js"));
53
55
  __exportStar(require("./requests/index.js"), exports);
54
56
  exports.update = __importStar(require("./update.js"));
@@ -0,0 +1,25 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as FernVenusApi from "../../../index.js";
3
+ export type Error = FernVenusApi.organization.previewClaim.Error.UnprocessableEntityError | FernVenusApi.organization.previewClaim.Error._Unknown;
4
+ export declare namespace Error {
5
+ interface UnprocessableEntityError extends _Utils {
6
+ statusCode: 422;
7
+ content: FernVenusApi.HttpValidationError;
8
+ }
9
+ interface _Unknown extends _Utils {
10
+ statusCode: void;
11
+ content: core.Fetcher.Error;
12
+ }
13
+ interface _Utils {
14
+ _visit: <_Result>(visitor: FernVenusApi.organization.previewClaim.Error._Visitor<_Result>) => _Result;
15
+ }
16
+ interface _Visitor<_Result> {
17
+ unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => _Result;
18
+ _other: (value: core.Fetcher.Error) => _Result;
19
+ }
20
+ }
21
+ export declare const Error: {
22
+ readonly unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => FernVenusApi.organization.previewClaim.Error.UnprocessableEntityError;
23
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.organization.previewClaim.Error._Unknown;
24
+ readonly _visit: <_Result>(value: FernVenusApi.organization.previewClaim.Error, visitor: FernVenusApi.organization.previewClaim.Error._Visitor<_Result>) => _Result;
25
+ };
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.Error = void 0;
38
+ const FernVenusApi = __importStar(require("../../../index.js"));
39
+ exports.Error = {
40
+ unprocessableEntityError: (value) => {
41
+ return {
42
+ content: value,
43
+ statusCode: 422,
44
+ _visit: function (visitor) {
45
+ return FernVenusApi.organization.previewClaim.Error._visit(this, visitor);
46
+ },
47
+ };
48
+ },
49
+ _unknown: (fetcherError) => {
50
+ return {
51
+ statusCode: undefined,
52
+ content: fetcherError,
53
+ _visit: function (visitor) {
54
+ return FernVenusApi.organization.previewClaim.Error._visit(this, visitor);
55
+ },
56
+ };
57
+ },
58
+ _visit: (value, visitor) => {
59
+ switch (value.statusCode) {
60
+ case 422:
61
+ return visitor.unprocessableEntityError(value.content);
62
+ default:
63
+ return visitor._other(value.content);
64
+ }
65
+ },
66
+ };
@@ -0,0 +1,3 @@
1
+ export interface ClaimOrganizationRequest {
2
+ claimToken: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface ClaimOrganizationResponse {
2
+ organizationId: string;
3
+ auth0Id: string;
4
+ displayName: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import type * as FernVenusApi from "../index.js";
2
+ export interface ClaimPreviewResponse {
3
+ organizationId: string;
4
+ displayName: string;
5
+ claimStatus: FernVenusApi.ClaimStatus;
6
+ expiresAt: Date;
7
+ redeemed: boolean;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,7 @@
1
1
  export * from "./Active.js";
2
+ export * from "./ClaimOrganizationRequest.js";
3
+ export * from "./ClaimOrganizationResponse.js";
4
+ export * from "./ClaimPreviewResponse.js";
2
5
  export * from "./ClaimStatus.js";
3
6
  export * from "./ClaimStatusResponse.js";
4
7
  export * from "./ClaimTokenResponse.js";
@@ -15,6 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Active.js"), exports);
18
+ __exportStar(require("./ClaimOrganizationRequest.js"), exports);
19
+ __exportStar(require("./ClaimOrganizationResponse.js"), exports);
20
+ __exportStar(require("./ClaimPreviewResponse.js"), exports);
18
21
  __exportStar(require("./ClaimStatus.js"), exports);
19
22
  __exportStar(require("./ClaimStatusResponse.js"), exports);
20
23
  __exportStar(require("./ClaimTokenResponse.js"), exports);
@@ -0,0 +1,9 @@
1
+ import type * as FernVenusApi from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const ClaimOrganizationRequest: core.serialization.ObjectSchema<serializers.ClaimOrganizationRequest.Raw, FernVenusApi.ClaimOrganizationRequest>;
5
+ export declare namespace ClaimOrganizationRequest {
6
+ interface Raw {
7
+ claimToken: string;
8
+ }
9
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ClaimOrganizationRequest = void 0;
38
+ const core = __importStar(require("../../core/index.js"));
39
+ exports.ClaimOrganizationRequest = core.serialization.object({
40
+ claimToken: core.serialization.string(),
41
+ });
@@ -0,0 +1,11 @@
1
+ import type * as FernVenusApi from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ export declare const ClaimOrganizationResponse: core.serialization.ObjectSchema<serializers.ClaimOrganizationResponse.Raw, FernVenusApi.ClaimOrganizationResponse>;
5
+ export declare namespace ClaimOrganizationResponse {
6
+ interface Raw {
7
+ organizationId: string;
8
+ auth0Id: string;
9
+ displayName: string;
10
+ }
11
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ClaimOrganizationResponse = void 0;
38
+ const core = __importStar(require("../../core/index.js"));
39
+ exports.ClaimOrganizationResponse = core.serialization.object({
40
+ organizationId: core.serialization.string(),
41
+ auth0Id: core.serialization.string(),
42
+ displayName: core.serialization.string(),
43
+ });
@@ -0,0 +1,14 @@
1
+ import type * as FernVenusApi from "../../api/index.js";
2
+ import * as core from "../../core/index.js";
3
+ import type * as serializers from "../index.js";
4
+ import { ClaimStatus } from "./ClaimStatus.js";
5
+ export declare const ClaimPreviewResponse: core.serialization.ObjectSchema<serializers.ClaimPreviewResponse.Raw, FernVenusApi.ClaimPreviewResponse>;
6
+ export declare namespace ClaimPreviewResponse {
7
+ interface Raw {
8
+ organizationId: string;
9
+ displayName: string;
10
+ claimStatus: ClaimStatus.Raw;
11
+ expiresAt: string;
12
+ redeemed: boolean;
13
+ }
14
+ }