@fern-api/fern-api-dev 5.95.1 → 5.96.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/cli.cjs +204 -35
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -58486,6 +58486,8 @@ var init_OAuthSchemeSchema2 = __esm({
|
|
|
58486
58486
|
"token-url": schemas_exports.string().optional(),
|
|
58487
58487
|
"refresh-url": schemas_exports.string().optional(),
|
|
58488
58488
|
"redirect-uri": RedirectUriSchema.optional(),
|
|
58489
|
+
"success-redirect-url": schemas_exports.string().optional(),
|
|
58490
|
+
"error-redirect-url": schemas_exports.string().optional(),
|
|
58489
58491
|
pkce: OAuthPkceSchema.optional(),
|
|
58490
58492
|
"authorization-parameters": schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
|
|
58491
58493
|
"device-authorization-parameters": schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
|
|
@@ -73891,6 +73893,8 @@ var init_OAuthAuthorizationCode2 = __esm({
|
|
|
73891
73893
|
refreshUrl: schemas_exports3.string().optional(),
|
|
73892
73894
|
redirectUri: schemas_exports3.string().optional(),
|
|
73893
73895
|
redirectUriBackupPorts: schemas_exports3.list(schemas_exports3.number()).optional(),
|
|
73896
|
+
successRedirectUrl: schemas_exports3.string().optional(),
|
|
73897
|
+
errorRedirectUrl: schemas_exports3.string().optional(),
|
|
73894
73898
|
scopes: schemas_exports3.list(schemas_exports3.string()).optional(),
|
|
73895
73899
|
pkce: OAuthPkceConfiguration,
|
|
73896
73900
|
authorizationParameters: schemas_exports3.record(schemas_exports3.string(), schemas_exports3.string()).optional(),
|
|
@@ -129783,6 +129787,8 @@ var init_OAuthSchemeSchema4 = __esm({
|
|
|
129783
129787
|
"token-url": schemas_exports8.string().optional(),
|
|
129784
129788
|
"refresh-url": schemas_exports8.string().optional(),
|
|
129785
129789
|
"redirect-uri": RedirectUriSchema2.optional(),
|
|
129790
|
+
"success-redirect-url": schemas_exports8.string().optional(),
|
|
129791
|
+
"error-redirect-url": schemas_exports8.string().optional(),
|
|
129786
129792
|
pkce: OAuthPkceSchema2.optional(),
|
|
129787
129793
|
"authorization-parameters": schemas_exports8.record(schemas_exports8.string(), schemas_exports8.string()).optional(),
|
|
129788
129794
|
"device-authorization-parameters": schemas_exports8.record(schemas_exports8.string(), schemas_exports8.string()).optional(),
|
|
@@ -278062,6 +278068,8 @@ function generateOAuth({ key: key2, file: file4, docs: docs2, rawScheme, propert
|
|
|
278062
278068
|
refreshUrl: rawScheme["refresh-url"],
|
|
278063
278069
|
redirectUri: getRedirectUri(rawScheme["redirect-uri"]),
|
|
278064
278070
|
redirectUriBackupPorts: getRedirectUriBackupPorts(rawScheme["redirect-uri"]),
|
|
278071
|
+
successRedirectUrl: rawScheme["success-redirect-url"],
|
|
278072
|
+
errorRedirectUrl: rawScheme["error-redirect-url"],
|
|
278065
278073
|
scopes: rawScheme.scopes,
|
|
278066
278074
|
pkce: { method: OAuthPkceMethod.S256 },
|
|
278067
278075
|
authorizationParameters: rawScheme["authorization-parameters"],
|
|
@@ -324662,6 +324670,28 @@ var init_api_yml_schema = __esm({
|
|
|
324662
324670
|
],
|
|
324663
324671
|
description: "The loopback redirect (callback) URI for the authorization-code flow. Must be a loopback host over http \u2014 `127.0.0.1` (recommended, RFC 8252 \xA77.3) or `localhost` \u2014 with any path; the generated CLI binds and sends this URI exactly, so it must match the redirect registered with the authorization server (e.g. `http://127.0.0.1:8484/callback` or `http://localhost:8484/callback`). Provide a bare string to pin a single port, or an object with `url` plus `ports` to add backup ports tried when the primary is busy. Omit it entirely to use an ephemeral (OS-assigned) port."
|
|
324664
324672
|
},
|
|
324673
|
+
"success-redirect-url": {
|
|
324674
|
+
oneOf: [
|
|
324675
|
+
{
|
|
324676
|
+
type: "string"
|
|
324677
|
+
},
|
|
324678
|
+
{
|
|
324679
|
+
type: "null"
|
|
324680
|
+
}
|
|
324681
|
+
],
|
|
324682
|
+
description: "A page the generated CLI redirects the browser to once it captures the authorization code, for the authorization-code flow. Must be an absolute http(s) URL. This is not an OAuth `redirect_uri` and does not need registering with the authorization server \u2014 the redirect happens on the loopback listener after the code is captured, and no `code` or `state` is forwarded. Omit it to serve the CLI's built-in success page."
|
|
324683
|
+
},
|
|
324684
|
+
"error-redirect-url": {
|
|
324685
|
+
oneOf: [
|
|
324686
|
+
{
|
|
324687
|
+
type: "string"
|
|
324688
|
+
},
|
|
324689
|
+
{
|
|
324690
|
+
type: "null"
|
|
324691
|
+
}
|
|
324692
|
+
],
|
|
324693
|
+
description: "A page the generated CLI redirects the browser to when authorization fails (the user denies consent, or the callback is unusable), for the authorization-code flow. Must be an absolute http(s) URL. The `error` and `error_description` query parameters are appended so the page can explain what happened \u2014 merged into any query string already on the URL, and inserted before a fragment if there is one. Omit it to serve the CLI's built-in failure page."
|
|
324694
|
+
},
|
|
324665
324695
|
pkce: {
|
|
324666
324696
|
oneOf: [
|
|
324667
324697
|
{
|
|
@@ -691824,13 +691854,13 @@ var ValidOauthRule = {
|
|
|
691824
691854
|
if (oauth.type === "authorization-code" || oauth.type === "device-code") {
|
|
691825
691855
|
return validatePublicClientFlow(oauth);
|
|
691826
691856
|
}
|
|
691857
|
+
violations.push(...rejectCallbackRedirectUrls(oauth));
|
|
691827
691858
|
if (oauth["get-token"] == null) {
|
|
691828
|
-
|
|
691829
|
-
|
|
691830
|
-
|
|
691831
|
-
|
|
691832
|
-
|
|
691833
|
-
];
|
|
691859
|
+
violations.push({
|
|
691860
|
+
severity: "fatal",
|
|
691861
|
+
message: "OAuth client-credentials flow requires a `get-token` endpoint."
|
|
691862
|
+
});
|
|
691863
|
+
return violations;
|
|
691834
691864
|
}
|
|
691835
691865
|
const tokenEndpointReference = oauth["get-token"].endpoint;
|
|
691836
691866
|
const resolvedTokenEndpoint = endpointResolver.resolveEndpoint({
|
|
@@ -691933,6 +691963,15 @@ function validatePublicClientFlow(oauth) {
|
|
|
691933
691963
|
}
|
|
691934
691964
|
}
|
|
691935
691965
|
}
|
|
691966
|
+
for (const field5 of CALLBACK_REDIRECT_URL_FIELDS) {
|
|
691967
|
+
const url3 = oauth[field5];
|
|
691968
|
+
if (url3 != null) {
|
|
691969
|
+
const urlError = validateCallbackRedirectUrl({ field: field5, url: url3 });
|
|
691970
|
+
if (urlError != null) {
|
|
691971
|
+
violations.push({ severity: "fatal", message: urlError });
|
|
691972
|
+
}
|
|
691973
|
+
}
|
|
691974
|
+
}
|
|
691936
691975
|
} else {
|
|
691937
691976
|
if (oauth["redirect-uri"] != null) {
|
|
691938
691977
|
violations.push({
|
|
@@ -691946,9 +691985,41 @@ function validatePublicClientFlow(oauth) {
|
|
|
691946
691985
|
message: "OAuth device-code flow does not use PKCE; remove `pkce` (it applies only to the authorization-code flow)."
|
|
691947
691986
|
});
|
|
691948
691987
|
}
|
|
691988
|
+
violations.push(...rejectCallbackRedirectUrls(oauth));
|
|
691949
691989
|
}
|
|
691950
691990
|
return violations;
|
|
691951
691991
|
}
|
|
691992
|
+
var CALLBACK_REDIRECT_URL_FIELDS = ["success-redirect-url", "error-redirect-url"];
|
|
691993
|
+
function rejectCallbackRedirectUrls(oauth) {
|
|
691994
|
+
return CALLBACK_REDIRECT_URL_FIELDS.filter((field5) => oauth[field5] != null).map((field5) => ({
|
|
691995
|
+
severity: "fatal",
|
|
691996
|
+
message: `OAuth ${oauth.type} flow has no browser callback; remove \`${field5}\` (it applies only to the authorization-code flow).`
|
|
691997
|
+
}));
|
|
691998
|
+
}
|
|
691999
|
+
function validateCallbackRedirectUrl({ field: field5, url: url3 }) {
|
|
692000
|
+
let parsed;
|
|
692001
|
+
try {
|
|
692002
|
+
parsed = new URL(url3);
|
|
692003
|
+
} catch {
|
|
692004
|
+
return `OAuth ${field5} '${url3}' is not a valid URL. Use an absolute http(s) URL, e.g. https://acme.com/cli/welcome.`;
|
|
692005
|
+
}
|
|
692006
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
692007
|
+
return `OAuth ${field5} '${url3}' must use http or https \u2014 the generated CLI redirects the browser to it.`;
|
|
692008
|
+
}
|
|
692009
|
+
if (containsControlCharacter(url3)) {
|
|
692010
|
+
return `OAuth ${field5} '${url3}' must not contain control characters.`;
|
|
692011
|
+
}
|
|
692012
|
+
return void 0;
|
|
692013
|
+
}
|
|
692014
|
+
function containsControlCharacter(value2) {
|
|
692015
|
+
for (let index3 = 0; index3 < value2.length; index3++) {
|
|
692016
|
+
const charCode = value2.charCodeAt(index3);
|
|
692017
|
+
if (charCode <= 31 || charCode === 127) {
|
|
692018
|
+
return true;
|
|
692019
|
+
}
|
|
692020
|
+
}
|
|
692021
|
+
return false;
|
|
692022
|
+
}
|
|
691952
692023
|
function validateRedirectUri(redirectUri) {
|
|
691953
692024
|
let parsed;
|
|
691954
692025
|
try {
|
|
@@ -702967,7 +703038,7 @@ var AccessTokenPosthogManager = class {
|
|
|
702967
703038
|
properties: {
|
|
702968
703039
|
...event,
|
|
702969
703040
|
...event.properties,
|
|
702970
|
-
version: "5.
|
|
703041
|
+
version: "5.96.0",
|
|
702971
703042
|
usingAccessToken: true,
|
|
702972
703043
|
...getRunIdProperties()
|
|
702973
703044
|
}
|
|
@@ -703033,7 +703104,7 @@ var UserPosthogManager = class {
|
|
|
703033
703104
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
703034
703105
|
event: "CLI",
|
|
703035
703106
|
properties: {
|
|
703036
|
-
version: "5.
|
|
703107
|
+
version: "5.96.0",
|
|
703037
703108
|
...event,
|
|
703038
703109
|
...event.properties,
|
|
703039
703110
|
usingAccessToken: false,
|
|
@@ -884199,7 +884270,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
884199
884270
|
var LOGS_FOLDER_NAME = "logs";
|
|
884200
884271
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
884201
884272
|
function getCliSource() {
|
|
884202
|
-
const version7 = "5.
|
|
884273
|
+
const version7 = "5.96.0";
|
|
884203
884274
|
return `cli@${version7}`;
|
|
884204
884275
|
}
|
|
884205
884276
|
var DebugLogger = class {
|
|
@@ -909515,7 +909586,7 @@ var LegacyDocsPublisher = class {
|
|
|
909515
909586
|
previewId,
|
|
909516
909587
|
disableTemplates: void 0,
|
|
909517
909588
|
skipUpload,
|
|
909518
|
-
cliVersion: "5.
|
|
909589
|
+
cliVersion: "5.96.0",
|
|
909519
909590
|
loginCommand: "fern auth login"
|
|
909520
909591
|
});
|
|
909521
909592
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -936180,6 +936251,7 @@ var BaseJavaCustomConfigSchema = external_exports2.object({
|
|
|
936180
936251
|
"inline-path-parameters": external_exports2.boolean().optional(),
|
|
936181
936252
|
"package-layout": external_exports2.enum(["flat", "nested"]).optional(),
|
|
936182
936253
|
"package-prefix": external_exports2.string().optional(),
|
|
936254
|
+
"respect-optional-request-body": external_exports2.boolean().optional(),
|
|
936183
936255
|
"use-local-date-for-dates": external_exports2.boolean().optional(),
|
|
936184
936256
|
// General options.
|
|
936185
936257
|
"custom-dependencies": external_exports2.array(external_exports2.string()).optional(),
|
|
@@ -939589,7 +939661,7 @@ var EndpointSnippetGenerator3 = class {
|
|
|
939589
939661
|
}
|
|
939590
939662
|
this.context.errors.unscope();
|
|
939591
939663
|
this.context.errors.scope(Scope4.RequestBody);
|
|
939592
|
-
if (request7.body != null) {
|
|
939664
|
+
if (request7.body != null && !this.callOmitsRequestBody({ request: request7, snippet })) {
|
|
939593
939665
|
args.push(this.getBodyRequestArg({ body: request7.body, value: snippet.requestBody }));
|
|
939594
939666
|
}
|
|
939595
939667
|
this.context.errors.unscope();
|
|
@@ -939599,6 +939671,20 @@ var EndpointSnippetGenerator3 = class {
|
|
|
939599
939671
|
}
|
|
939600
939672
|
return args;
|
|
939601
939673
|
}
|
|
939674
|
+
/**
|
|
939675
|
+
* Whether the call leaves the body out entirely, which the shorter overload accepts. Applies
|
|
939676
|
+
* only to a body the caller may omit, and only once the generator opts in to that.
|
|
939677
|
+
*/
|
|
939678
|
+
callOmitsRequestBody({ request: request7, snippet }) {
|
|
939679
|
+
if (this.context.customConfig?.["respect-optional-request-body"] !== true) {
|
|
939680
|
+
return false;
|
|
939681
|
+
}
|
|
939682
|
+
if (request7.bodyRequired !== false) {
|
|
939683
|
+
return false;
|
|
939684
|
+
}
|
|
939685
|
+
const value2 = snippet.requestBody;
|
|
939686
|
+
return value2 == null || typeof value2 === "object" && !Array.isArray(value2) && Object.keys(value2).length === 0;
|
|
939687
|
+
}
|
|
939602
939688
|
usesOptionalNullable() {
|
|
939603
939689
|
return this.context.customConfig?.["collapse-optional-nullable"] === true;
|
|
939604
939690
|
}
|
|
@@ -960237,6 +960323,7 @@ var TypescriptCustomConfigSchema = external_exports2.strictObject({
|
|
|
960237
960323
|
useDefaultRequestParameterValues: external_exports2.optional(external_exports2.boolean()),
|
|
960238
960324
|
packageManager: external_exports2.optional(external_exports2.enum(["pnpm", "yarn"])),
|
|
960239
960325
|
flattenRequestParameters: external_exports2.optional(external_exports2.boolean()),
|
|
960326
|
+
respectOptionalRequestBody: external_exports2.optional(external_exports2.boolean()),
|
|
960240
960327
|
exportAllRequestsAtRoot: external_exports2.optional(external_exports2.boolean()),
|
|
960241
960328
|
customReadmeSections: external_exports2.optional(external_exports2.array(CustomReadmeSectionSchema2)),
|
|
960242
960329
|
testFramework: external_exports2.optional(external_exports2.enum(["jest", "vitest"])),
|
|
@@ -961175,18 +961262,39 @@ function resolveNaming({ namespaceExport, naming }) {
|
|
|
961175
961262
|
// ../../../generators/typescript-v2/dynamic-snippets/lib/context/DynamicTypeLiteralMapper.js
|
|
961176
961263
|
init_lib4();
|
|
961177
961264
|
|
|
961178
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961265
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/index.mjs
|
|
961179
961266
|
var api_exports23 = {};
|
|
961180
961267
|
__export(api_exports23, {
|
|
961268
|
+
AvailabilityStatus: () => AvailabilityStatus30,
|
|
961269
|
+
GlobalParameterApplyMode: () => GlobalParameterApplyMode4,
|
|
961270
|
+
GlobalParameterLocation: () => GlobalParameterLocation4,
|
|
961271
|
+
PrimitiveTypeV1: () => PrimitiveTypeV146,
|
|
961181
961272
|
commons: () => commons_exports60,
|
|
961182
961273
|
dynamic: () => dynamic_exports30,
|
|
961183
|
-
generatorExec: () => generatorExec_exports30
|
|
961274
|
+
generatorExec: () => generatorExec_exports30,
|
|
961275
|
+
globalParameters: () => globalParameters_exports6,
|
|
961276
|
+
types: () => types_exports69
|
|
961184
961277
|
});
|
|
961185
961278
|
|
|
961186
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961279
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/commons/index.mjs
|
|
961187
961280
|
var commons_exports60 = {};
|
|
961281
|
+
__export(commons_exports60, {
|
|
961282
|
+
AvailabilityStatus: () => AvailabilityStatus30
|
|
961283
|
+
});
|
|
961188
961284
|
|
|
961189
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961285
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/commons/types/AvailabilityStatus.mjs
|
|
961286
|
+
var AvailabilityStatus30 = {
|
|
961287
|
+
InDevelopment: "IN_DEVELOPMENT",
|
|
961288
|
+
PreRelease: "PRE_RELEASE",
|
|
961289
|
+
GeneralAvailability: "GENERAL_AVAILABILITY",
|
|
961290
|
+
Deprecated: "DEPRECATED",
|
|
961291
|
+
Alpha: "ALPHA",
|
|
961292
|
+
Beta: "BETA",
|
|
961293
|
+
Preview: "PREVIEW",
|
|
961294
|
+
Legacy: "LEGACY"
|
|
961295
|
+
};
|
|
961296
|
+
|
|
961297
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/index.mjs
|
|
961190
961298
|
var dynamic_exports30 = {};
|
|
961191
961299
|
__export(dynamic_exports30, {
|
|
961192
961300
|
ErrorSeverity: () => ErrorSeverity30,
|
|
@@ -961205,28 +961313,28 @@ __export(dynamic_exports30, {
|
|
|
961205
961313
|
variables: () => variables_exports47
|
|
961206
961314
|
});
|
|
961207
961315
|
|
|
961208
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961316
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/auth/index.mjs
|
|
961209
961317
|
var auth_exports65 = {};
|
|
961210
961318
|
|
|
961211
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961319
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/commons/index.mjs
|
|
961212
961320
|
var commons_exports61 = {};
|
|
961213
961321
|
|
|
961214
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961322
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/declaration/index.mjs
|
|
961215
961323
|
var declaration_exports30 = {};
|
|
961216
961324
|
|
|
961217
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961325
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/endpoints/index.mjs
|
|
961218
961326
|
var endpoints_exports30 = {};
|
|
961219
961327
|
|
|
961220
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961328
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/environment/index.mjs
|
|
961221
961329
|
var environment_exports57 = {};
|
|
961222
961330
|
|
|
961223
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961331
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/http/index.mjs
|
|
961224
961332
|
var http_exports45 = {};
|
|
961225
961333
|
__export(http_exports45, {
|
|
961226
961334
|
HttpMethod: () => HttpMethod49
|
|
961227
961335
|
});
|
|
961228
961336
|
|
|
961229
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961337
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/http/types/HttpMethod.mjs
|
|
961230
961338
|
var HttpMethod49 = {
|
|
961231
961339
|
Get: "GET",
|
|
961232
961340
|
Post: "POST",
|
|
@@ -961236,35 +961344,35 @@ var HttpMethod49 = {
|
|
|
961236
961344
|
Head: "HEAD"
|
|
961237
961345
|
};
|
|
961238
961346
|
|
|
961239
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961347
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/ir/index.mjs
|
|
961240
961348
|
var ir_exports59 = {};
|
|
961241
961349
|
|
|
961242
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961350
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/snippets/index.mjs
|
|
961243
961351
|
var snippets_exports30 = {};
|
|
961244
961352
|
__export(snippets_exports30, {
|
|
961245
961353
|
ErrorSeverity: () => ErrorSeverity30
|
|
961246
961354
|
});
|
|
961247
961355
|
|
|
961248
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961356
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/snippets/types/ErrorSeverity.mjs
|
|
961249
961357
|
var ErrorSeverity30 = {
|
|
961250
961358
|
Critical: "CRITICAL",
|
|
961251
961359
|
Warning: "WARNING"
|
|
961252
961360
|
};
|
|
961253
961361
|
|
|
961254
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961362
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/types/index.mjs
|
|
961255
961363
|
var types_exports68 = {};
|
|
961256
961364
|
__export(types_exports68, {
|
|
961257
961365
|
ObjectPropertyAccess: () => ObjectPropertyAccess43,
|
|
961258
961366
|
PrimitiveTypeV1: () => PrimitiveTypeV145
|
|
961259
961367
|
});
|
|
961260
961368
|
|
|
961261
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961369
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/types/types/ObjectPropertyAccess.mjs
|
|
961262
961370
|
var ObjectPropertyAccess43 = {
|
|
961263
961371
|
ReadOnly: "READ_ONLY",
|
|
961264
961372
|
WriteOnly: "WRITE_ONLY"
|
|
961265
961373
|
};
|
|
961266
961374
|
|
|
961267
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961375
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/types/types/PrimitiveTypeV1.mjs
|
|
961268
961376
|
var PrimitiveTypeV145 = {
|
|
961269
961377
|
Integer: "INTEGER",
|
|
961270
961378
|
/**
|
|
@@ -961284,28 +961392,75 @@ var PrimitiveTypeV145 = {
|
|
|
961284
961392
|
BigInteger: "BIG_INTEGER"
|
|
961285
961393
|
};
|
|
961286
961394
|
|
|
961287
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961395
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/variables/index.mjs
|
|
961288
961396
|
var variables_exports47 = {};
|
|
961289
961397
|
|
|
961290
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961398
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/generatorExec/index.mjs
|
|
961291
961399
|
var generatorExec_exports30 = {};
|
|
961292
961400
|
__export(generatorExec_exports30, {
|
|
961293
961401
|
LicenseId: () => LicenseId30,
|
|
961294
961402
|
config: () => config_exports30
|
|
961295
961403
|
});
|
|
961296
961404
|
|
|
961297
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961405
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/generatorExec/resources/config/index.mjs
|
|
961298
961406
|
var config_exports30 = {};
|
|
961299
961407
|
__export(config_exports30, {
|
|
961300
961408
|
LicenseId: () => LicenseId30
|
|
961301
961409
|
});
|
|
961302
961410
|
|
|
961303
|
-
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@
|
|
961411
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/generatorExec/resources/config/types/LicenseId.mjs
|
|
961304
961412
|
var LicenseId30 = {
|
|
961305
961413
|
Mit: "MIT",
|
|
961306
961414
|
Apache2: "Apache-2.0"
|
|
961307
961415
|
};
|
|
961308
961416
|
|
|
961417
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/globalParameters/index.mjs
|
|
961418
|
+
var globalParameters_exports6 = {};
|
|
961419
|
+
__export(globalParameters_exports6, {
|
|
961420
|
+
GlobalParameterApplyMode: () => GlobalParameterApplyMode4,
|
|
961421
|
+
GlobalParameterLocation: () => GlobalParameterLocation4
|
|
961422
|
+
});
|
|
961423
|
+
|
|
961424
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/globalParameters/types/GlobalParameterApplyMode.mjs
|
|
961425
|
+
var GlobalParameterApplyMode4 = {
|
|
961426
|
+
Explicit: "explicit",
|
|
961427
|
+
Auto: "auto"
|
|
961428
|
+
};
|
|
961429
|
+
|
|
961430
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/globalParameters/types/GlobalParameterLocation.mjs
|
|
961431
|
+
var GlobalParameterLocation4 = {
|
|
961432
|
+
Header: "header",
|
|
961433
|
+
Query: "query",
|
|
961434
|
+
Body: "body",
|
|
961435
|
+
Path: "path"
|
|
961436
|
+
};
|
|
961437
|
+
|
|
961438
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/types/index.mjs
|
|
961439
|
+
var types_exports69 = {};
|
|
961440
|
+
__export(types_exports69, {
|
|
961441
|
+
PrimitiveTypeV1: () => PrimitiveTypeV146
|
|
961442
|
+
});
|
|
961443
|
+
|
|
961444
|
+
// ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/types/types/PrimitiveTypeV1.mjs
|
|
961445
|
+
var PrimitiveTypeV146 = {
|
|
961446
|
+
Integer: "INTEGER",
|
|
961447
|
+
/**
|
|
961448
|
+
* Within the range -2^53 to 2^53 */
|
|
961449
|
+
Long: "LONG",
|
|
961450
|
+
Uint: "UINT",
|
|
961451
|
+
Uint64: "UINT_64",
|
|
961452
|
+
Float: "FLOAT",
|
|
961453
|
+
Double: "DOUBLE",
|
|
961454
|
+
Boolean: "BOOLEAN",
|
|
961455
|
+
String: "STRING",
|
|
961456
|
+
Date: "DATE",
|
|
961457
|
+
DateTime: "DATE_TIME",
|
|
961458
|
+
DateTimeRfc2822: "DATE_TIME_RFC_2822",
|
|
961459
|
+
Uuid: "UUID",
|
|
961460
|
+
Base64: "BASE_64",
|
|
961461
|
+
BigInteger: "BIG_INTEGER"
|
|
961462
|
+
};
|
|
961463
|
+
|
|
961309
961464
|
// ../../../generators/typescript-v2/dynamic-snippets/lib/context/DynamicTypeLiteralMapper.js
|
|
961310
961465
|
var UNION_VALUE_KEY2 = "value";
|
|
961311
961466
|
var DynamicTypeLiteralMapper7 = class {
|
|
@@ -962242,7 +962397,7 @@ var EndpointSnippetGenerator9 = class {
|
|
|
962242
962397
|
}
|
|
962243
962398
|
this.context.errors.unscope();
|
|
962244
962399
|
this.context.errors.scope(Scope4.RequestBody);
|
|
962245
|
-
if (request7.body != null) {
|
|
962400
|
+
if (request7.body != null && !this.callOmitsRequestBody({ request: request7, snippet })) {
|
|
962246
962401
|
const bodyArg = this.getBodyRequestArg({ body: request7.body, value: snippet.requestBody });
|
|
962247
962402
|
if (!typescript_exports.TypeLiteral.isNop(bodyArg)) {
|
|
962248
962403
|
args.push(bodyArg);
|
|
@@ -962251,6 +962406,20 @@ var EndpointSnippetGenerator9 = class {
|
|
|
962251
962406
|
this.context.errors.unscope();
|
|
962252
962407
|
return args;
|
|
962253
962408
|
}
|
|
962409
|
+
/**
|
|
962410
|
+
* Whether the call leaves the body out entirely, which the optional parameter allows. Applies
|
|
962411
|
+
* only to a body the caller may omit, and only once the generator opts in to that.
|
|
962412
|
+
*/
|
|
962413
|
+
callOmitsRequestBody({ request: request7, snippet }) {
|
|
962414
|
+
if (this.context.customConfig?.respectOptionalRequestBody !== true) {
|
|
962415
|
+
return false;
|
|
962416
|
+
}
|
|
962417
|
+
if (request7.bodyRequired !== false) {
|
|
962418
|
+
return false;
|
|
962419
|
+
}
|
|
962420
|
+
const value2 = snippet.requestBody;
|
|
962421
|
+
return value2 == null || typeof value2 === "object" && !Array.isArray(value2) && Object.keys(value2).length === 0;
|
|
962422
|
+
}
|
|
962254
962423
|
getBodyRequestArg({ body, value: value2 }) {
|
|
962255
962424
|
switch (body.type) {
|
|
962256
962425
|
case "bytes":
|
|
@@ -976633,7 +976802,7 @@ function getAutomationContextFromEnv() {
|
|
|
976633
976802
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
976634
976803
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
976635
976804
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
976636
|
-
cli_version: "5.
|
|
976805
|
+
cli_version: "5.96.0"
|
|
976637
976806
|
};
|
|
976638
976807
|
}
|
|
976639
976808
|
function isAutomationMode() {
|
|
@@ -977465,7 +977634,7 @@ var CliContext = class _CliContext {
|
|
|
977465
977634
|
if (false) {
|
|
977466
977635
|
this.logger.error("CLI_VERSION is not defined");
|
|
977467
977636
|
}
|
|
977468
|
-
return "5.
|
|
977637
|
+
return "5.96.0";
|
|
977469
977638
|
}
|
|
977470
977639
|
getCliName() {
|
|
977471
977640
|
if (false) {
|
package/package.json
CHANGED