@fern-api/venus-api-sdk 14.0.0 → 14.1.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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/organization/client/Client.d.ts +26 -4
- package/dist/cjs/api/resources/organization/client/Client.js +90 -4
- package/dist/cjs/api/resources/organization/client/getPublisherDocs.d.ts +25 -0
- package/dist/cjs/api/resources/organization/client/getPublisherDocs.js +66 -0
- package/dist/cjs/api/resources/organization/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/organization/client/index.js +2 -1
- package/dist/cjs/api/resources/organization/client/requests/CreateClaimTokenRequest.d.ts +2 -0
- package/dist/cjs/api/resources/organization/client/requests/CreateOrganizationRequest.d.ts +2 -0
- package/dist/cjs/api/resources/organization/client/requests/GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest.d.ts +12 -0
- package/dist/cjs/api/resources/organization/client/requests/GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest.js +3 -0
- package/dist/cjs/api/resources/organization/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/Publisher.d.ts +10 -0
- package/dist/cjs/api/types/Publisher.js +3 -0
- package/dist/cjs/api/types/PublisherDocsResponse.d.ts +6 -0
- package/dist/cjs/api/types/PublisherDocsResponse.js +3 -0
- package/dist/cjs/api/types/PublisherType.d.ts +5 -0
- package/dist/cjs/api/types/PublisherType.js +8 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -0
- package/dist/cjs/serialization/resources/organization/client/requests/CreateClaimTokenRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/organization/client/requests/CreateClaimTokenRequest.js +2 -0
- package/dist/cjs/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/organization/client/requests/CreateOrganizationRequest.js +2 -0
- package/dist/cjs/serialization/types/Publisher.d.ts +11 -0
- package/dist/cjs/serialization/types/Publisher.js +43 -0
- package/dist/cjs/serialization/types/PublisherDocsResponse.d.ts +12 -0
- package/dist/cjs/serialization/types/PublisherDocsResponse.js +44 -0
- package/dist/cjs/serialization/types/PublisherType.d.ts +7 -0
- package/dist/cjs/serialization/types/PublisherType.js +39 -0
- package/dist/cjs/serialization/types/index.d.ts +3 -0
- package/dist/cjs/serialization/types/index.js +3 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/organization/client/Client.d.mts +26 -4
- package/dist/esm/api/resources/organization/client/Client.mjs +90 -4
- package/dist/esm/api/resources/organization/client/getPublisherDocs.d.mts +25 -0
- package/dist/esm/api/resources/organization/client/getPublisherDocs.mjs +30 -0
- package/dist/esm/api/resources/organization/client/index.d.mts +1 -0
- package/dist/esm/api/resources/organization/client/index.mjs +1 -0
- package/dist/esm/api/resources/organization/client/requests/CreateClaimTokenRequest.d.mts +2 -0
- package/dist/esm/api/resources/organization/client/requests/CreateOrganizationRequest.d.mts +2 -0
- package/dist/esm/api/resources/organization/client/requests/GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest.d.mts +12 -0
- package/dist/esm/api/resources/organization/client/requests/GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest.mjs +2 -0
- package/dist/esm/api/resources/organization/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/Publisher.d.mts +10 -0
- package/dist/esm/api/types/Publisher.mjs +2 -0
- package/dist/esm/api/types/PublisherDocsResponse.d.mts +6 -0
- package/dist/esm/api/types/PublisherDocsResponse.mjs +2 -0
- package/dist/esm/api/types/PublisherType.d.mts +5 -0
- package/dist/esm/api/types/PublisherType.mjs +5 -0
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/serialization/resources/organization/client/requests/CreateClaimTokenRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/organization/client/requests/CreateClaimTokenRequest.mjs +2 -0
- package/dist/esm/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/organization/client/requests/CreateOrganizationRequest.mjs +2 -0
- package/dist/esm/serialization/types/Publisher.d.mts +11 -0
- package/dist/esm/serialization/types/Publisher.mjs +7 -0
- package/dist/esm/serialization/types/PublisherDocsResponse.d.mts +12 -0
- package/dist/esm/serialization/types/PublisherDocsResponse.mjs +8 -0
- package/dist/esm/serialization/types/PublisherType.d.mts +7 -0
- package/dist/esm/serialization/types/PublisherType.mjs +3 -0
- package/dist/esm/serialization/types/index.d.mts +3 -0
- package/dist/esm/serialization/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +78 -4
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -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": "14.
|
|
47
|
-
"User-Agent": "@fern-api/venus-api-sdk/14.
|
|
46
|
+
"X-Fern-SDK-Version": "14.1.0",
|
|
47
|
+
"User-Agent": "@fern-api/venus-api-sdk/14.1.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);
|
|
@@ -13,8 +13,9 @@ export declare class OrganizationClient {
|
|
|
13
13
|
/**
|
|
14
14
|
* Creates an organization with the caller as its admin. Called with the
|
|
15
15
|
* provisioner token, it instead creates an unclaimed organization, with no
|
|
16
|
-
* Auth0 organization or members,
|
|
17
|
-
* Creating it again for the same
|
|
16
|
+
* Auth0 organization or members, held for the required publisher (or
|
|
17
|
+
* postmanTeamId). Creating it again for the same publisher returns the
|
|
18
|
+
* same organization, which may have another ID than the one asked for.
|
|
18
19
|
* A normal signup gets 409 if its postmanTeamId is linked to an unclaimed
|
|
19
20
|
* organization, since that team claims its organization through Postman.
|
|
20
21
|
*
|
|
@@ -95,6 +96,23 @@ export declare class OrganizationClient {
|
|
|
95
96
|
*/
|
|
96
97
|
getPostmanTeamDocs(request: FernVenusApi.GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.PostmanTeamDocsResponse, FernVenusApi.organization.getPostmanTeamDocs.Error>>;
|
|
97
98
|
private __getPostmanTeamDocs;
|
|
99
|
+
/**
|
|
100
|
+
* The claimable organization held for a publisher, with its claim
|
|
101
|
+
* status and the address of its docs site. Only Postman's integration
|
|
102
|
+
* service token can call it. 404 when the publisher has no claimable
|
|
103
|
+
* organization, or its docs address isn't set.
|
|
104
|
+
*
|
|
105
|
+
* @param {FernVenusApi.GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest} request
|
|
106
|
+
* @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* await client.organization.getPublisherDocs({
|
|
110
|
+
* publisherType: "postman_team",
|
|
111
|
+
* publisherId: "publisher_id"
|
|
112
|
+
* })
|
|
113
|
+
*/
|
|
114
|
+
getPublisherDocs(request: FernVenusApi.GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest, requestOptions?: OrganizationClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.PublisherDocsResponse, FernVenusApi.organization.getPublisherDocs.Error>>;
|
|
115
|
+
private __getPublisherDocs;
|
|
98
116
|
/**
|
|
99
117
|
* Get the Postman team ID associated with an organization ID.
|
|
100
118
|
*
|
|
@@ -126,7 +144,9 @@ export declare class OrganizationClient {
|
|
|
126
144
|
/**
|
|
127
145
|
* Issues a claim link for an unclaimed organization, bound to one Postman
|
|
128
146
|
* user and valid for 15 minutes. Only the provisioner token and Postman's
|
|
129
|
-
* integration service token can call it.
|
|
147
|
+
* integration service token can call it. For an organization held for a
|
|
148
|
+
* Postman user, the caller must name that user as the publisher, or gets
|
|
149
|
+
* 403 PublisherMismatchError.
|
|
130
150
|
*
|
|
131
151
|
* @param {FernVenusApi.CreateClaimTokenRequest} request
|
|
132
152
|
* @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -192,7 +212,9 @@ export declare class OrganizationClient {
|
|
|
192
212
|
* Postman user the link was issued for, who becomes its admin if they
|
|
193
213
|
* already have a Fern account; otherwise the organization starts with
|
|
194
214
|
* no members, and the dashboard adds the team's Postman users when they
|
|
195
|
-
* sign in with Postman.
|
|
215
|
+
* sign in with Postman. An organization with no team would then stay
|
|
216
|
+
* empty, so without a Fern account it gets 403 FernAccountRequiredError
|
|
217
|
+
* and stays unclaimed. Public: the link is the secret, and only the
|
|
196
218
|
* provisioner and Postman's integration service can get one. The first
|
|
197
219
|
* claim wins, and a retry finishes a claim that failed partway.
|
|
198
220
|
*
|
|
@@ -67,8 +67,9 @@ class OrganizationClient {
|
|
|
67
67
|
/**
|
|
68
68
|
* Creates an organization with the caller as its admin. Called with the
|
|
69
69
|
* provisioner token, it instead creates an unclaimed organization, with no
|
|
70
|
-
* Auth0 organization or members,
|
|
71
|
-
* Creating it again for the same
|
|
70
|
+
* Auth0 organization or members, held for the required publisher (or
|
|
71
|
+
* postmanTeamId). Creating it again for the same publisher returns the
|
|
72
|
+
* same organization, which may have another ID than the one asked for.
|
|
72
73
|
* A normal signup gets 409 if its postmanTeamId is linked to an unclaimed
|
|
73
74
|
* organization, since that team claims its organization through Postman.
|
|
74
75
|
*
|
|
@@ -535,6 +536,87 @@ class OrganizationClient {
|
|
|
535
536
|
};
|
|
536
537
|
});
|
|
537
538
|
}
|
|
539
|
+
/**
|
|
540
|
+
* The claimable organization held for a publisher, with its claim
|
|
541
|
+
* status and the address of its docs site. Only Postman's integration
|
|
542
|
+
* service token can call it. 404 when the publisher has no claimable
|
|
543
|
+
* organization, or its docs address isn't set.
|
|
544
|
+
*
|
|
545
|
+
* @param {FernVenusApi.GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest} request
|
|
546
|
+
* @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
547
|
+
*
|
|
548
|
+
* @example
|
|
549
|
+
* await client.organization.getPublisherDocs({
|
|
550
|
+
* publisherType: "postman_team",
|
|
551
|
+
* publisherId: "publisher_id"
|
|
552
|
+
* })
|
|
553
|
+
*/
|
|
554
|
+
getPublisherDocs(request, requestOptions) {
|
|
555
|
+
return core.HttpResponsePromise.fromPromise(this.__getPublisherDocs(request, requestOptions));
|
|
556
|
+
}
|
|
557
|
+
__getPublisherDocs(request, requestOptions) {
|
|
558
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
559
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
560
|
+
const { publisherType, publisherId } = request;
|
|
561
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
562
|
+
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);
|
|
563
|
+
const _response = yield core.fetcher({
|
|
564
|
+
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/publishers/${core.url.encodePathParam(serializers.PublisherType.jsonOrThrow(publisherType, { omitUndefined: true }))}/${core.url.encodePathParam(publisherId)}/docs`),
|
|
565
|
+
method: "GET",
|
|
566
|
+
headers: _headers,
|
|
567
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
568
|
+
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,
|
|
569
|
+
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,
|
|
570
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
571
|
+
fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
|
|
572
|
+
logging: this._options.logging,
|
|
573
|
+
});
|
|
574
|
+
if (_response.ok) {
|
|
575
|
+
return {
|
|
576
|
+
data: {
|
|
577
|
+
ok: true,
|
|
578
|
+
body: serializers.PublisherDocsResponse.parseOrThrow(_response.body, {
|
|
579
|
+
unrecognizedObjectKeys: "passthrough",
|
|
580
|
+
allowUnrecognizedUnionMembers: true,
|
|
581
|
+
allowUnrecognizedEnumValues: true,
|
|
582
|
+
skipValidation: true,
|
|
583
|
+
breadcrumbsPrefix: ["response"],
|
|
584
|
+
}),
|
|
585
|
+
headers: _response.headers,
|
|
586
|
+
rawResponse: _response.rawResponse,
|
|
587
|
+
},
|
|
588
|
+
rawResponse: _response.rawResponse,
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
if (_response.error.reason === "status-code") {
|
|
592
|
+
switch (_response.error.statusCode) {
|
|
593
|
+
case 422:
|
|
594
|
+
return {
|
|
595
|
+
data: {
|
|
596
|
+
ok: false,
|
|
597
|
+
error: FernVenusApi.organization.getPublisherDocs.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
598
|
+
unrecognizedObjectKeys: "passthrough",
|
|
599
|
+
allowUnrecognizedUnionMembers: true,
|
|
600
|
+
allowUnrecognizedEnumValues: true,
|
|
601
|
+
skipValidation: true,
|
|
602
|
+
breadcrumbsPrefix: ["response"],
|
|
603
|
+
})),
|
|
604
|
+
rawResponse: _response.rawResponse,
|
|
605
|
+
},
|
|
606
|
+
rawResponse: _response.rawResponse,
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
return {
|
|
611
|
+
data: {
|
|
612
|
+
ok: false,
|
|
613
|
+
error: FernVenusApi.organization.getPublisherDocs.Error._unknown(_response.error),
|
|
614
|
+
rawResponse: _response.rawResponse,
|
|
615
|
+
},
|
|
616
|
+
rawResponse: _response.rawResponse,
|
|
617
|
+
};
|
|
618
|
+
});
|
|
619
|
+
}
|
|
538
620
|
/**
|
|
539
621
|
* Get the Postman team ID associated with an organization ID.
|
|
540
622
|
*
|
|
@@ -694,7 +776,9 @@ class OrganizationClient {
|
|
|
694
776
|
/**
|
|
695
777
|
* Issues a claim link for an unclaimed organization, bound to one Postman
|
|
696
778
|
* user and valid for 15 minutes. Only the provisioner token and Postman's
|
|
697
|
-
* integration service token can call it.
|
|
779
|
+
* integration service token can call it. For an organization held for a
|
|
780
|
+
* Postman user, the caller must name that user as the publisher, or gets
|
|
781
|
+
* 403 PublisherMismatchError.
|
|
698
782
|
*
|
|
699
783
|
* @param {FernVenusApi.CreateClaimTokenRequest} request
|
|
700
784
|
* @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1032,7 +1116,9 @@ class OrganizationClient {
|
|
|
1032
1116
|
* Postman user the link was issued for, who becomes its admin if they
|
|
1033
1117
|
* already have a Fern account; otherwise the organization starts with
|
|
1034
1118
|
* no members, and the dashboard adds the team's Postman users when they
|
|
1035
|
-
* sign in with Postman.
|
|
1119
|
+
* sign in with Postman. An organization with no team would then stay
|
|
1120
|
+
* empty, so without a Fern account it gets 403 FernAccountRequiredError
|
|
1121
|
+
* and stays unclaimed. Public: the link is the secret, and only the
|
|
1036
1122
|
* provisioner and Postman's integration service can get one. The first
|
|
1037
1123
|
* claim wins, and a retry finishes a claim that failed partway.
|
|
1038
1124
|
*
|
|
@@ -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.getPublisherDocs.Error.UnprocessableEntityError | FernVenusApi.organization.getPublisherDocs.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.getPublisherDocs.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.getPublisherDocs.Error.UnprocessableEntityError;
|
|
23
|
+
readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.organization.getPublisherDocs.Error._Unknown;
|
|
24
|
+
readonly _visit: <_Result>(value: FernVenusApi.organization.getPublisherDocs.Error, visitor: FernVenusApi.organization.getPublisherDocs.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.getPublisherDocs.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.getPublisherDocs.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
|
+
};
|
|
@@ -11,6 +11,7 @@ export * as getOrgIdsByPostmanTeamId from "./getOrgIdsByPostmanTeamId.js";
|
|
|
11
11
|
export * as getOrgIdsFromToken from "./getOrgIdsFromToken.js";
|
|
12
12
|
export * as getPostmanTeamDocs from "./getPostmanTeamDocs.js";
|
|
13
13
|
export * as getPostmanTeamIdByOrgId from "./getPostmanTeamIdByOrgId.js";
|
|
14
|
+
export * as getPublisherDocs from "./getPublisherDocs.js";
|
|
14
15
|
export * as inviteUser from "./inviteUser.js";
|
|
15
16
|
export * as isMember from "./isMember.js";
|
|
16
17
|
export * as previewClaim from "./previewClaim.js";
|
|
@@ -36,7 +36,7 @@ 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.setDocsUrl = exports.removeUser = exports.previewClaim = exports.isMember = exports.inviteUser = exports.getPostmanTeamIdByOrgId = exports.getPostmanTeamDocs = exports.getOrgIdsFromToken = exports.getOrgIdsByPostmanTeamId = exports.getMyOrganizationFromScopedToken = exports.getClaimStatus = exports.get = exports.delete = exports.createClaimToken = exports.create = exports.claimFromDocsSite = exports.claim = exports.addUser = void 0;
|
|
39
|
+
exports.update = exports.setDocsUrl = exports.removeUser = exports.previewClaim = exports.isMember = exports.inviteUser = exports.getPublisherDocs = exports.getPostmanTeamIdByOrgId = exports.getPostmanTeamDocs = exports.getOrgIdsFromToken = exports.getOrgIdsByPostmanTeamId = exports.getMyOrganizationFromScopedToken = exports.getClaimStatus = exports.get = exports.delete = exports.createClaimToken = exports.create = exports.claimFromDocsSite = exports.claim = exports.addUser = void 0;
|
|
40
40
|
exports.addUser = __importStar(require("./addUser.js"));
|
|
41
41
|
exports.claim = __importStar(require("./claim.js"));
|
|
42
42
|
exports.claimFromDocsSite = __importStar(require("./claimFromDocsSite.js"));
|
|
@@ -50,6 +50,7 @@ exports.getOrgIdsByPostmanTeamId = __importStar(require("./getOrgIdsByPostmanTea
|
|
|
50
50
|
exports.getOrgIdsFromToken = __importStar(require("./getOrgIdsFromToken.js"));
|
|
51
51
|
exports.getPostmanTeamDocs = __importStar(require("./getPostmanTeamDocs.js"));
|
|
52
52
|
exports.getPostmanTeamIdByOrgId = __importStar(require("./getPostmanTeamIdByOrgId.js"));
|
|
53
|
+
exports.getPublisherDocs = __importStar(require("./getPublisherDocs.js"));
|
|
53
54
|
exports.inviteUser = __importStar(require("./inviteUser.js"));
|
|
54
55
|
exports.isMember = __importStar(require("./isMember.js"));
|
|
55
56
|
exports.previewClaim = __importStar(require("./previewClaim.js"));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as FernVenusApi from "../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {
|
|
@@ -12,4 +13,5 @@ export interface CreateOrganizationRequest {
|
|
|
12
13
|
enableGoogleConnection?: boolean | null;
|
|
13
14
|
enablePostmanConnection?: boolean | null;
|
|
14
15
|
postmanTeamId?: string | null;
|
|
16
|
+
publisher?: FernVenusApi.Publisher | null;
|
|
15
17
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as FernVenusApi from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* publisherType: "postman_team",
|
|
6
|
+
* publisherId: "publisher_id"
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest {
|
|
10
|
+
publisherType: FernVenusApi.PublisherType;
|
|
11
|
+
publisherId: string;
|
|
12
|
+
}
|
|
@@ -8,6 +8,7 @@ export type { GetOrganizationsOrgIdGetRequest } from "./GetOrganizationsOrgIdGet
|
|
|
8
8
|
export type { GetOrgIdsByPostmanTeamIdOrganizationsPostmanTeamPostmanTeamIdGetRequest } from "./GetOrgIdsByPostmanTeamIdOrganizationsPostmanTeamPostmanTeamIdGetRequest.js";
|
|
9
9
|
export type { GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest } from "./GetPostmanTeamDocsOrganizationsPostmanTeamPostmanTeamIdDocsGetRequest.js";
|
|
10
10
|
export type { GetPostmanTeamIdByOrgIdOrganizationsOrgIdPostmanTeamIdGetRequest } from "./GetPostmanTeamIdByOrgIdOrganizationsOrgIdPostmanTeamIdGetRequest.js";
|
|
11
|
+
export type { GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest } from "./GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest.js";
|
|
11
12
|
export type { InviteUserToOrgRequest } from "./InviteUserToOrgRequest.js";
|
|
12
13
|
export type { IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest } from "./IsMemberOrganizationsBelongsToOrganizationOrganizationIdPostRequest.js";
|
|
13
14
|
export type { RemoveUserFromOrgRequest } from "./RemoveUserFromOrgRequest.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as FernVenusApi from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Who an unclaimed organization is held for: a Postman team, or a single
|
|
4
|
+
* Postman user. Whoever the calling service verifies as the publisher can
|
|
5
|
+
* get a claim link for it.
|
|
6
|
+
*/
|
|
7
|
+
export interface Publisher {
|
|
8
|
+
type: FernVenusApi.PublisherType;
|
|
9
|
+
id: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PublisherType = void 0;
|
|
5
|
+
exports.PublisherType = {
|
|
6
|
+
PostmanTeam: "postman_team",
|
|
7
|
+
PostmanUser: "postman_user",
|
|
8
|
+
};
|
|
@@ -37,6 +37,9 @@ export * from "./NpmRegistryToken.js";
|
|
|
37
37
|
export * from "./Organization.js";
|
|
38
38
|
export * from "./OrganizationsPage.js";
|
|
39
39
|
export * from "./PostmanTeamDocsResponse.js";
|
|
40
|
+
export * from "./Publisher.js";
|
|
41
|
+
export * from "./PublisherDocsResponse.js";
|
|
42
|
+
export * from "./PublisherType.js";
|
|
40
43
|
export * from "./Pypi.js";
|
|
41
44
|
export * from "./PypiRegistryToken.js";
|
|
42
45
|
export * from "./RegistryToken.js";
|
|
@@ -53,6 +53,9 @@ __exportStar(require("./NpmRegistryToken.js"), exports);
|
|
|
53
53
|
__exportStar(require("./Organization.js"), exports);
|
|
54
54
|
__exportStar(require("./OrganizationsPage.js"), exports);
|
|
55
55
|
__exportStar(require("./PostmanTeamDocsResponse.js"), exports);
|
|
56
|
+
__exportStar(require("./Publisher.js"), exports);
|
|
57
|
+
__exportStar(require("./PublisherDocsResponse.js"), exports);
|
|
58
|
+
__exportStar(require("./PublisherType.js"), exports);
|
|
56
59
|
__exportStar(require("./Pypi.js"), exports);
|
|
57
60
|
__exportStar(require("./PypiRegistryToken.js"), exports);
|
|
58
61
|
__exportStar(require("./RegistryToken.js"), exports);
|
package/dist/cjs/serialization/resources/organization/client/requests/CreateClaimTokenRequest.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type * as FernVenusApi from "../../../../../api/index.js";
|
|
2
2
|
import * as core from "../../../../../core/index.js";
|
|
3
3
|
import type * as serializers from "../../../../index.js";
|
|
4
|
+
import { Publisher } from "../../../../types/Publisher.js";
|
|
4
5
|
export declare const CreateClaimTokenRequest: core.serialization.Schema<serializers.CreateClaimTokenRequest.Raw, Omit<FernVenusApi.CreateClaimTokenRequest, "orgId">>;
|
|
5
6
|
export declare namespace CreateClaimTokenRequest {
|
|
6
7
|
interface Raw {
|
|
7
8
|
postmanUserId: string;
|
|
9
|
+
publisher?: (Publisher.Raw | null | undefined) | null;
|
|
8
10
|
}
|
|
9
11
|
}
|
package/dist/cjs/serialization/resources/organization/client/requests/CreateClaimTokenRequest.js
CHANGED
|
@@ -36,6 +36,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.CreateClaimTokenRequest = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../../core/index.js"));
|
|
39
|
+
const Publisher_js_1 = require("../../../../types/Publisher.js");
|
|
39
40
|
exports.CreateClaimTokenRequest = core.serialization.object({
|
|
40
41
|
postmanUserId: core.serialization.string(),
|
|
42
|
+
publisher: Publisher_js_1.Publisher.optionalNullable(),
|
|
41
43
|
});
|
package/dist/cjs/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as FernVenusApi from "../../../../../api/index.js";
|
|
2
2
|
import * as core from "../../../../../core/index.js";
|
|
3
3
|
import type * as serializers from "../../../../index.js";
|
|
4
|
+
import { Publisher } from "../../../../types/Publisher.js";
|
|
4
5
|
export declare const CreateOrganizationRequest: core.serialization.Schema<serializers.CreateOrganizationRequest.Raw, FernVenusApi.CreateOrganizationRequest>;
|
|
5
6
|
export declare namespace CreateOrganizationRequest {
|
|
6
7
|
interface Raw {
|
|
@@ -11,5 +12,6 @@ export declare namespace CreateOrganizationRequest {
|
|
|
11
12
|
enableGoogleConnection?: (boolean | null | undefined) | null;
|
|
12
13
|
enablePostmanConnection?: (boolean | null | undefined) | null;
|
|
13
14
|
postmanTeamId?: (string | null | undefined) | null;
|
|
15
|
+
publisher?: (Publisher.Raw | null | undefined) | null;
|
|
14
16
|
}
|
|
15
17
|
}
|
package/dist/cjs/serialization/resources/organization/client/requests/CreateOrganizationRequest.js
CHANGED
|
@@ -36,6 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.CreateOrganizationRequest = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../../core/index.js"));
|
|
39
|
+
const Publisher_js_1 = require("../../../../types/Publisher.js");
|
|
39
40
|
exports.CreateOrganizationRequest = core.serialization.object({
|
|
40
41
|
organizationId: core.serialization.string(),
|
|
41
42
|
displayName: core.serialization.string().optionalNullable(),
|
|
@@ -44,4 +45,5 @@ exports.CreateOrganizationRequest = core.serialization.object({
|
|
|
44
45
|
enableGoogleConnection: core.serialization.boolean().optionalNullable(),
|
|
45
46
|
enablePostmanConnection: core.serialization.boolean().optionalNullable(),
|
|
46
47
|
postmanTeamId: core.serialization.string().optionalNullable(),
|
|
48
|
+
publisher: Publisher_js_1.Publisher.optionalNullable(),
|
|
47
49
|
});
|
|
@@ -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
|
+
import { PublisherType } from "./PublisherType.js";
|
|
5
|
+
export declare const Publisher: core.serialization.ObjectSchema<serializers.Publisher.Raw, FernVenusApi.Publisher>;
|
|
6
|
+
export declare namespace Publisher {
|
|
7
|
+
interface Raw {
|
|
8
|
+
type: PublisherType.Raw;
|
|
9
|
+
id: 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.Publisher = void 0;
|
|
38
|
+
const core = __importStar(require("../../core/index.js"));
|
|
39
|
+
const PublisherType_js_1 = require("./PublisherType.js");
|
|
40
|
+
exports.Publisher = core.serialization.object({
|
|
41
|
+
type: PublisherType_js_1.PublisherType,
|
|
42
|
+
id: core.serialization.string(),
|
|
43
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
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 PublisherDocsResponse: core.serialization.ObjectSchema<serializers.PublisherDocsResponse.Raw, FernVenusApi.PublisherDocsResponse>;
|
|
6
|
+
export declare namespace PublisherDocsResponse {
|
|
7
|
+
interface Raw {
|
|
8
|
+
organizationId: string;
|
|
9
|
+
claimStatus: ClaimStatus.Raw;
|
|
10
|
+
docsUrl: string;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.PublisherDocsResponse = void 0;
|
|
38
|
+
const core = __importStar(require("../../core/index.js"));
|
|
39
|
+
const ClaimStatus_js_1 = require("./ClaimStatus.js");
|
|
40
|
+
exports.PublisherDocsResponse = core.serialization.object({
|
|
41
|
+
organizationId: core.serialization.string(),
|
|
42
|
+
claimStatus: ClaimStatus_js_1.ClaimStatus,
|
|
43
|
+
docsUrl: core.serialization.string(),
|
|
44
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
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 PublisherType: core.serialization.Schema<serializers.PublisherType.Raw, FernVenusApi.PublisherType>;
|
|
5
|
+
export declare namespace PublisherType {
|
|
6
|
+
type Raw = "postman_team" | "postman_user";
|
|
7
|
+
}
|