@fern-api/venus-api-sdk 14.0.0 → 15.0.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 (77) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/resources/guestSession/client/Client.js +14 -2
  4. package/dist/cjs/api/resources/guestSession/client/create.d.ts +3 -3
  5. package/dist/cjs/api/resources/guestSession/client/get.d.ts +3 -3
  6. package/dist/cjs/api/resources/organization/client/Client.d.ts +26 -4
  7. package/dist/cjs/api/resources/organization/client/Client.js +90 -4
  8. package/dist/cjs/api/resources/organization/client/getPublisherDocs.d.ts +25 -0
  9. package/dist/cjs/api/resources/organization/client/getPublisherDocs.js +66 -0
  10. package/dist/cjs/api/resources/organization/client/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/organization/client/index.js +2 -1
  12. package/dist/cjs/api/resources/organization/client/requests/CreateClaimTokenRequest.d.ts +2 -0
  13. package/dist/cjs/api/resources/organization/client/requests/CreateOrganizationRequest.d.ts +2 -0
  14. package/dist/cjs/api/resources/organization/client/requests/GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest.d.ts +12 -0
  15. package/dist/cjs/api/resources/organization/client/requests/GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest.js +3 -0
  16. package/dist/cjs/api/resources/organization/client/requests/index.d.ts +1 -0
  17. package/dist/cjs/api/types/Publisher.d.ts +10 -0
  18. package/dist/cjs/api/types/Publisher.js +3 -0
  19. package/dist/cjs/api/types/PublisherDocsResponse.d.ts +6 -0
  20. package/dist/cjs/api/types/PublisherDocsResponse.js +3 -0
  21. package/dist/cjs/api/types/PublisherType.d.ts +5 -0
  22. package/dist/cjs/api/types/PublisherType.js +8 -0
  23. package/dist/cjs/api/types/index.d.ts +3 -0
  24. package/dist/cjs/api/types/index.js +3 -0
  25. package/dist/cjs/serialization/resources/organization/client/requests/CreateClaimTokenRequest.d.ts +2 -0
  26. package/dist/cjs/serialization/resources/organization/client/requests/CreateClaimTokenRequest.js +2 -0
  27. package/dist/cjs/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +2 -0
  28. package/dist/cjs/serialization/resources/organization/client/requests/CreateOrganizationRequest.js +2 -0
  29. package/dist/cjs/serialization/types/Publisher.d.ts +11 -0
  30. package/dist/cjs/serialization/types/Publisher.js +43 -0
  31. package/dist/cjs/serialization/types/PublisherDocsResponse.d.ts +12 -0
  32. package/dist/cjs/serialization/types/PublisherDocsResponse.js +44 -0
  33. package/dist/cjs/serialization/types/PublisherType.d.ts +7 -0
  34. package/dist/cjs/serialization/types/PublisherType.js +39 -0
  35. package/dist/cjs/serialization/types/index.d.ts +3 -0
  36. package/dist/cjs/serialization/types/index.js +3 -0
  37. package/dist/cjs/version.d.ts +1 -1
  38. package/dist/cjs/version.js +1 -1
  39. package/dist/esm/BaseClient.mjs +2 -2
  40. package/dist/esm/api/resources/guestSession/client/Client.mjs +14 -2
  41. package/dist/esm/api/resources/guestSession/client/create.d.mts +3 -3
  42. package/dist/esm/api/resources/guestSession/client/get.d.mts +3 -3
  43. package/dist/esm/api/resources/organization/client/Client.d.mts +26 -4
  44. package/dist/esm/api/resources/organization/client/Client.mjs +90 -4
  45. package/dist/esm/api/resources/organization/client/getPublisherDocs.d.mts +25 -0
  46. package/dist/esm/api/resources/organization/client/getPublisherDocs.mjs +30 -0
  47. package/dist/esm/api/resources/organization/client/index.d.mts +1 -0
  48. package/dist/esm/api/resources/organization/client/index.mjs +1 -0
  49. package/dist/esm/api/resources/organization/client/requests/CreateClaimTokenRequest.d.mts +2 -0
  50. package/dist/esm/api/resources/organization/client/requests/CreateOrganizationRequest.d.mts +2 -0
  51. package/dist/esm/api/resources/organization/client/requests/GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest.d.mts +12 -0
  52. package/dist/esm/api/resources/organization/client/requests/GetPublisherDocsOrganizationsPublishersPublisherTypePublisherIdDocsGetRequest.mjs +2 -0
  53. package/dist/esm/api/resources/organization/client/requests/index.d.mts +1 -0
  54. package/dist/esm/api/types/Publisher.d.mts +10 -0
  55. package/dist/esm/api/types/Publisher.mjs +2 -0
  56. package/dist/esm/api/types/PublisherDocsResponse.d.mts +6 -0
  57. package/dist/esm/api/types/PublisherDocsResponse.mjs +2 -0
  58. package/dist/esm/api/types/PublisherType.d.mts +5 -0
  59. package/dist/esm/api/types/PublisherType.mjs +5 -0
  60. package/dist/esm/api/types/index.d.mts +3 -0
  61. package/dist/esm/api/types/index.mjs +3 -0
  62. package/dist/esm/serialization/resources/organization/client/requests/CreateClaimTokenRequest.d.mts +2 -0
  63. package/dist/esm/serialization/resources/organization/client/requests/CreateClaimTokenRequest.mjs +2 -0
  64. package/dist/esm/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.mts +2 -0
  65. package/dist/esm/serialization/resources/organization/client/requests/CreateOrganizationRequest.mjs +2 -0
  66. package/dist/esm/serialization/types/Publisher.d.mts +11 -0
  67. package/dist/esm/serialization/types/Publisher.mjs +7 -0
  68. package/dist/esm/serialization/types/PublisherDocsResponse.d.mts +12 -0
  69. package/dist/esm/serialization/types/PublisherDocsResponse.mjs +8 -0
  70. package/dist/esm/serialization/types/PublisherType.d.mts +7 -0
  71. package/dist/esm/serialization/types/PublisherType.mjs +3 -0
  72. package/dist/esm/serialization/types/index.d.mts +3 -0
  73. package/dist/esm/serialization/types/index.mjs +3 -0
  74. package/dist/esm/version.d.mts +1 -1
  75. package/dist/esm/version.mjs +1 -1
  76. package/package.json +1 -1
  77. package/reference.md +78 -4
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Fern TypeScript Library
2
2
 
3
- [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Ffern-api%2Fvenus-node)
3
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Fern%2FTypeScript)
4
4
  [![npm shield](https://img.shields.io/npm/v/@fern-api/venus-api-sdk)](https://www.npmjs.com/package/@fern-api/venus-api-sdk)
5
5
 
6
6
  The Fern TypeScript library provides convenient access to the Fern APIs from TypeScript.
@@ -31,7 +31,7 @@ npm i -s @fern-api/venus-api-sdk
31
31
 
32
32
  ## Reference
33
33
 
34
- A full reference for this library is available [here](https://github.com/fern-api/venus-node/blob/HEAD/./reference.md).
34
+ A full reference for this library is available [here](./reference.md).
35
35
 
36
36
  ## Usage
37
37
 
@@ -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.0.0",
47
- "User-Agent": "@fern-api/venus-api-sdk/14.0.0",
46
+ "X-Fern-SDK-Version": "15.0.0",
47
+ "User-Agent": "@fern-api/venus-api-sdk/15.0.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);
@@ -158,7 +158,13 @@ class GuestSessionClient {
158
158
  return {
159
159
  data: {
160
160
  ok: false,
161
- error: FernVenusApi.guestSession.create.Error.serviceUnavailableError(_response.error.body),
161
+ error: FernVenusApi.guestSession.create.Error.serviceUnavailableError(serializers.ServiceUnavailableErrorBody.parseOrThrow(_response.error.body, {
162
+ unrecognizedObjectKeys: "passthrough",
163
+ allowUnrecognizedUnionMembers: true,
164
+ allowUnrecognizedEnumValues: true,
165
+ skipValidation: true,
166
+ breadcrumbsPrefix: ["response"],
167
+ })),
162
168
  rawResponse: _response.rawResponse,
163
169
  },
164
170
  rawResponse: _response.rawResponse,
@@ -278,7 +284,13 @@ class GuestSessionClient {
278
284
  return {
279
285
  data: {
280
286
  ok: false,
281
- error: FernVenusApi.guestSession.get.Error.serviceUnavailableError(_response.error.body),
287
+ error: FernVenusApi.guestSession.get.Error.serviceUnavailableError(serializers.ServiceUnavailableErrorBody.parseOrThrow(_response.error.body, {
288
+ unrecognizedObjectKeys: "passthrough",
289
+ allowUnrecognizedUnionMembers: true,
290
+ allowUnrecognizedEnumValues: true,
291
+ skipValidation: true,
292
+ breadcrumbsPrefix: ["response"],
293
+ })),
282
294
  rawResponse: _response.rawResponse,
283
295
  },
284
296
  rawResponse: _response.rawResponse,
@@ -12,7 +12,7 @@ export declare namespace Error {
12
12
  }
13
13
  interface ServiceUnavailableError extends _Utils {
14
14
  statusCode: 503;
15
- content?: unknown;
15
+ content: FernVenusApi.ServiceUnavailableErrorBody;
16
16
  }
17
17
  interface _Unknown extends _Utils {
18
18
  statusCode: void;
@@ -24,14 +24,14 @@ export declare namespace Error {
24
24
  interface _Visitor<_Result> {
25
25
  unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => _Result;
26
26
  tooManyRequestsError: (value: FernVenusApi.TooManyRequestsErrorBody) => _Result;
27
- serviceUnavailableError: (value: unknown) => _Result;
27
+ serviceUnavailableError: (value: FernVenusApi.ServiceUnavailableErrorBody) => _Result;
28
28
  _other: (value: core.Fetcher.Error) => _Result;
29
29
  }
30
30
  }
31
31
  export declare const Error: {
32
32
  readonly unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => FernVenusApi.guestSession.create.Error.UnprocessableEntityError;
33
33
  readonly tooManyRequestsError: (value: FernVenusApi.TooManyRequestsErrorBody) => FernVenusApi.guestSession.create.Error.TooManyRequestsError;
34
- readonly serviceUnavailableError: (value?: unknown) => FernVenusApi.guestSession.create.Error.ServiceUnavailableError;
34
+ readonly serviceUnavailableError: (value: FernVenusApi.ServiceUnavailableErrorBody) => FernVenusApi.guestSession.create.Error.ServiceUnavailableError;
35
35
  readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.guestSession.create.Error._Unknown;
36
36
  readonly _visit: <_Result>(value: FernVenusApi.guestSession.create.Error, visitor: FernVenusApi.guestSession.create.Error._Visitor<_Result>) => _Result;
37
37
  };
@@ -16,7 +16,7 @@ export declare namespace Error {
16
16
  }
17
17
  interface ServiceUnavailableError extends _Utils {
18
18
  statusCode: 503;
19
- content?: unknown;
19
+ content: FernVenusApi.ServiceUnavailableErrorBody;
20
20
  }
21
21
  interface _Unknown extends _Utils {
22
22
  statusCode: void;
@@ -29,7 +29,7 @@ export declare namespace Error {
29
29
  notFoundError: (value: FernVenusApi.NotFoundErrorBody) => _Result;
30
30
  goneError: (value: FernVenusApi.GoneErrorBody) => _Result;
31
31
  unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => _Result;
32
- serviceUnavailableError: (value: unknown) => _Result;
32
+ serviceUnavailableError: (value: FernVenusApi.ServiceUnavailableErrorBody) => _Result;
33
33
  _other: (value: core.Fetcher.Error) => _Result;
34
34
  }
35
35
  }
@@ -37,7 +37,7 @@ export declare const Error: {
37
37
  readonly notFoundError: (value: FernVenusApi.NotFoundErrorBody) => FernVenusApi.guestSession.get.Error.NotFoundError;
38
38
  readonly goneError: (value: FernVenusApi.GoneErrorBody) => FernVenusApi.guestSession.get.Error.GoneError;
39
39
  readonly unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => FernVenusApi.guestSession.get.Error.UnprocessableEntityError;
40
- readonly serviceUnavailableError: (value?: unknown) => FernVenusApi.guestSession.get.Error.ServiceUnavailableError;
40
+ readonly serviceUnavailableError: (value: FernVenusApi.ServiceUnavailableErrorBody) => FernVenusApi.guestSession.get.Error.ServiceUnavailableError;
41
41
  readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.guestSession.get.Error._Unknown;
42
42
  readonly _visit: <_Result>(value: FernVenusApi.guestSession.get.Error, visitor: FernVenusApi.guestSession.get.Error._Visitor<_Result>) => _Result;
43
43
  };
@@ -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, linked to the required postmanTeamId.
17
- * Creating it again for the same team returns the same organization.
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. Public: the link is the secret, and only the
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, linked to the required postmanTeamId.
71
- * Creating it again for the same team returns the same organization.
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. Public: the link is the secret, and only the
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
  * {
@@ -8,4 +9,5 @@
8
9
  export interface CreateClaimTokenRequest {
9
10
  orgId: string;
10
11
  postmanUserId: string;
12
+ publisher?: FernVenusApi.Publisher | null;
11
13
  }
@@ -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
+ }
@@ -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 });
@@ -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,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,6 @@
1
+ import type * as FernVenusApi from "../index.js";
2
+ export interface PublisherDocsResponse {
3
+ organizationId: string;
4
+ claimStatus: FernVenusApi.ClaimStatus;
5
+ docsUrl: string;
6
+ }
@@ -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 declare const PublisherType: {
2
+ readonly PostmanTeam: "postman_team";
3
+ readonly PostmanUser: "postman_user";
4
+ };
5
+ export type PublisherType = (typeof PublisherType)[keyof typeof PublisherType];
@@ -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);
@@ -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
  }
@@ -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
  });
@@ -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
  }
@@ -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
+ }