@foxnose/sdk 0.1.1 → 0.2.1

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/index.d.cts CHANGED
@@ -93,8 +93,8 @@ interface RetryConfig {
93
93
  methods: readonly string[];
94
94
  }
95
95
  declare const DEFAULT_RETRY_CONFIG: Readonly<RetryConfig>;
96
- declare const SDK_VERSION = "0.1.1";
97
- declare const DEFAULT_USER_AGENT = "foxnose-sdk-js/0.1.1";
96
+ declare const SDK_VERSION = "0.2.1";
97
+ declare const DEFAULT_USER_AGENT = "foxnose-sdk-js/0.2.1";
98
98
  /**
99
99
  * General transport-level configuration shared by all clients.
100
100
  */
@@ -385,6 +385,10 @@ interface APIFolderSummary {
385
385
  api?: string | null;
386
386
  path?: string | null;
387
387
  allowed_methods?: string[] | null;
388
+ description_get_one?: string | null;
389
+ description_get_many?: string | null;
390
+ description_search?: string | null;
391
+ description_schema?: string | null;
388
392
  created_at?: string | null;
389
393
  }
390
394
  type APIFolderList = PaginatedResponse<APIFolderSummary>;
@@ -519,6 +523,15 @@ interface ManagementClientOptions {
519
523
  retryConfig?: RetryConfig;
520
524
  defaultHeaders?: Record<string, string>;
521
525
  }
526
+ interface ApiFolderRouteDescriptionOptions {
527
+ descriptionGetOne?: string;
528
+ descriptionGetMany?: string;
529
+ descriptionSearch?: string;
530
+ descriptionSchema?: string;
531
+ }
532
+ interface ApiFolderOptions extends ApiFolderRouteDescriptionOptions {
533
+ allowedMethods?: string[];
534
+ }
522
535
  /**
523
536
  * Client for the FoxNose Management API.
524
537
  *
@@ -563,13 +576,9 @@ declare class ManagementClient {
563
576
  updateApi(apiKey: APIRef, payload: Record<string, any>): Promise<APIInfo>;
564
577
  deleteApi(apiKey: APIRef): Promise<void>;
565
578
  listApiFolders(apiKey: APIRef, params?: Record<string, any>): Promise<APIFolderList>;
566
- addApiFolder(apiKey: APIRef, folderKey: FolderRef, options?: {
567
- allowedMethods?: string[];
568
- }): Promise<APIFolderSummary>;
579
+ addApiFolder(apiKey: APIRef, folderKey: FolderRef, options?: ApiFolderOptions): Promise<APIFolderSummary>;
569
580
  getApiFolder(apiKey: APIRef, folderKey: FolderRef): Promise<APIFolderSummary>;
570
- updateApiFolder(apiKey: APIRef, folderKey: FolderRef, options?: {
571
- allowedMethods?: string[];
572
- }): Promise<APIFolderSummary>;
581
+ updateApiFolder(apiKey: APIRef, folderKey: FolderRef, options?: ApiFolderOptions): Promise<APIFolderSummary>;
573
582
  removeApiFolder(apiKey: APIRef, folderKey: FolderRef): Promise<void>;
574
583
  listManagementRoles(params?: Record<string, any>): Promise<ManagementRoleList>;
575
584
  createManagementRole(payload: Record<string, any>): Promise<ManagementRoleSummary>;
@@ -710,7 +719,9 @@ declare class FluxClient {
710
719
  listResources<T = any>(folderPath: string, params?: Record<string, any>): Promise<T>;
711
720
  getResource<T = any>(folderPath: string, resourceKey: string, params?: Record<string, any>): Promise<T>;
712
721
  search<T = any>(folderPath: string, body: Record<string, any>): Promise<T>;
722
+ getRouter<T = any>(): Promise<T>;
723
+ getSchema<T = any>(folderPath: string): Promise<T>;
713
724
  close(): void;
714
725
  }
715
726
 
716
- export { type APIFolderList, type APIFolderSummary, type APIInfo, type APIList, type APIRef, AnonymousAuth, type AuthStrategy, type BatchItemError, type BatchUpsertItem, type BatchUpsertResult, type ComponentList, type ComponentRef, type ComponentSummary, type CurrentUsage, DEFAULT_RETRY_CONFIG, DEFAULT_USER_AGENT, type EnvironmentList, type EnvironmentRef, type EnvironmentSummary, type FieldList, type FieldSummary, type FluxAPIKeyList, type FluxAPIKeyRef, type FluxAPIKeySummary, FluxClient, type FluxClientOptions, type FluxRoleList, type FluxRoleRef, type FluxRoleSummary, type FolderList, type FolderRef, type FolderSummary, FoxnoseAPIError, FoxnoseAuthError, type FoxnoseConfig, FoxnoseError, FoxnoseTransportError, HttpTransport, JWTAuth, type LocaleList, type LocaleSummary, type ManagementAPIKeyList, type ManagementAPIKeyRef, type ManagementAPIKeySummary, ManagementClient, type ManagementClientOptions, type ManagementRoleList, type ManagementRoleRef, type ManagementRoleSummary, type OrgRef, type OrganizationList, type OrganizationOwner, type OrganizationPlanStatus, type OrganizationSummary, type OrganizationUsage, type PaginatedResponse, type PlanDetails, type PlanLimits, type ProjectList, type ProjectRef, type ProjectSummary, type RegionInfo, type RequestData, type ResourceList, type ResourceRef, type ResourceSummary, type RetryConfig, type RevisionList, type RevisionRef, type RevisionSummary, type RolePermission, type RolePermissionObject, SDK_VERSION, type SchemaVersionList, type SchemaVersionRef, type SchemaVersionSummary, SecureKeyAuth, SimpleKeyAuth, StaticTokenProvider, type StorageUsage, type TokenProvider, type UnitsUsage, type UsageBreakdown, type UsageMetric, type UserReference, SDK_VERSION as VERSION, createConfig, resolveKey };
727
+ export { type APIFolderList, type APIFolderSummary, type APIInfo, type APIList, type APIRef, AnonymousAuth, type ApiFolderOptions, type ApiFolderRouteDescriptionOptions, type AuthStrategy, type BatchItemError, type BatchUpsertItem, type BatchUpsertResult, type ComponentList, type ComponentRef, type ComponentSummary, type CurrentUsage, DEFAULT_RETRY_CONFIG, DEFAULT_USER_AGENT, type EnvironmentList, type EnvironmentRef, type EnvironmentSummary, type FieldList, type FieldSummary, type FluxAPIKeyList, type FluxAPIKeyRef, type FluxAPIKeySummary, FluxClient, type FluxClientOptions, type FluxRoleList, type FluxRoleRef, type FluxRoleSummary, type FolderList, type FolderRef, type FolderSummary, FoxnoseAPIError, FoxnoseAuthError, type FoxnoseConfig, FoxnoseError, FoxnoseTransportError, HttpTransport, JWTAuth, type LocaleList, type LocaleSummary, type ManagementAPIKeyList, type ManagementAPIKeyRef, type ManagementAPIKeySummary, ManagementClient, type ManagementClientOptions, type ManagementRoleList, type ManagementRoleRef, type ManagementRoleSummary, type OrgRef, type OrganizationList, type OrganizationOwner, type OrganizationPlanStatus, type OrganizationSummary, type OrganizationUsage, type PaginatedResponse, type PlanDetails, type PlanLimits, type ProjectList, type ProjectRef, type ProjectSummary, type RegionInfo, type RequestData, type ResourceList, type ResourceRef, type ResourceSummary, type RetryConfig, type RevisionList, type RevisionRef, type RevisionSummary, type RolePermission, type RolePermissionObject, SDK_VERSION, type SchemaVersionList, type SchemaVersionRef, type SchemaVersionSummary, SecureKeyAuth, SimpleKeyAuth, StaticTokenProvider, type StorageUsage, type TokenProvider, type UnitsUsage, type UsageBreakdown, type UsageMetric, type UserReference, SDK_VERSION as VERSION, createConfig, resolveKey };
package/dist/index.d.ts CHANGED
@@ -93,8 +93,8 @@ interface RetryConfig {
93
93
  methods: readonly string[];
94
94
  }
95
95
  declare const DEFAULT_RETRY_CONFIG: Readonly<RetryConfig>;
96
- declare const SDK_VERSION = "0.1.1";
97
- declare const DEFAULT_USER_AGENT = "foxnose-sdk-js/0.1.1";
96
+ declare const SDK_VERSION = "0.2.1";
97
+ declare const DEFAULT_USER_AGENT = "foxnose-sdk-js/0.2.1";
98
98
  /**
99
99
  * General transport-level configuration shared by all clients.
100
100
  */
@@ -385,6 +385,10 @@ interface APIFolderSummary {
385
385
  api?: string | null;
386
386
  path?: string | null;
387
387
  allowed_methods?: string[] | null;
388
+ description_get_one?: string | null;
389
+ description_get_many?: string | null;
390
+ description_search?: string | null;
391
+ description_schema?: string | null;
388
392
  created_at?: string | null;
389
393
  }
390
394
  type APIFolderList = PaginatedResponse<APIFolderSummary>;
@@ -519,6 +523,15 @@ interface ManagementClientOptions {
519
523
  retryConfig?: RetryConfig;
520
524
  defaultHeaders?: Record<string, string>;
521
525
  }
526
+ interface ApiFolderRouteDescriptionOptions {
527
+ descriptionGetOne?: string;
528
+ descriptionGetMany?: string;
529
+ descriptionSearch?: string;
530
+ descriptionSchema?: string;
531
+ }
532
+ interface ApiFolderOptions extends ApiFolderRouteDescriptionOptions {
533
+ allowedMethods?: string[];
534
+ }
522
535
  /**
523
536
  * Client for the FoxNose Management API.
524
537
  *
@@ -563,13 +576,9 @@ declare class ManagementClient {
563
576
  updateApi(apiKey: APIRef, payload: Record<string, any>): Promise<APIInfo>;
564
577
  deleteApi(apiKey: APIRef): Promise<void>;
565
578
  listApiFolders(apiKey: APIRef, params?: Record<string, any>): Promise<APIFolderList>;
566
- addApiFolder(apiKey: APIRef, folderKey: FolderRef, options?: {
567
- allowedMethods?: string[];
568
- }): Promise<APIFolderSummary>;
579
+ addApiFolder(apiKey: APIRef, folderKey: FolderRef, options?: ApiFolderOptions): Promise<APIFolderSummary>;
569
580
  getApiFolder(apiKey: APIRef, folderKey: FolderRef): Promise<APIFolderSummary>;
570
- updateApiFolder(apiKey: APIRef, folderKey: FolderRef, options?: {
571
- allowedMethods?: string[];
572
- }): Promise<APIFolderSummary>;
581
+ updateApiFolder(apiKey: APIRef, folderKey: FolderRef, options?: ApiFolderOptions): Promise<APIFolderSummary>;
573
582
  removeApiFolder(apiKey: APIRef, folderKey: FolderRef): Promise<void>;
574
583
  listManagementRoles(params?: Record<string, any>): Promise<ManagementRoleList>;
575
584
  createManagementRole(payload: Record<string, any>): Promise<ManagementRoleSummary>;
@@ -710,7 +719,9 @@ declare class FluxClient {
710
719
  listResources<T = any>(folderPath: string, params?: Record<string, any>): Promise<T>;
711
720
  getResource<T = any>(folderPath: string, resourceKey: string, params?: Record<string, any>): Promise<T>;
712
721
  search<T = any>(folderPath: string, body: Record<string, any>): Promise<T>;
722
+ getRouter<T = any>(): Promise<T>;
723
+ getSchema<T = any>(folderPath: string): Promise<T>;
713
724
  close(): void;
714
725
  }
715
726
 
716
- export { type APIFolderList, type APIFolderSummary, type APIInfo, type APIList, type APIRef, AnonymousAuth, type AuthStrategy, type BatchItemError, type BatchUpsertItem, type BatchUpsertResult, type ComponentList, type ComponentRef, type ComponentSummary, type CurrentUsage, DEFAULT_RETRY_CONFIG, DEFAULT_USER_AGENT, type EnvironmentList, type EnvironmentRef, type EnvironmentSummary, type FieldList, type FieldSummary, type FluxAPIKeyList, type FluxAPIKeyRef, type FluxAPIKeySummary, FluxClient, type FluxClientOptions, type FluxRoleList, type FluxRoleRef, type FluxRoleSummary, type FolderList, type FolderRef, type FolderSummary, FoxnoseAPIError, FoxnoseAuthError, type FoxnoseConfig, FoxnoseError, FoxnoseTransportError, HttpTransport, JWTAuth, type LocaleList, type LocaleSummary, type ManagementAPIKeyList, type ManagementAPIKeyRef, type ManagementAPIKeySummary, ManagementClient, type ManagementClientOptions, type ManagementRoleList, type ManagementRoleRef, type ManagementRoleSummary, type OrgRef, type OrganizationList, type OrganizationOwner, type OrganizationPlanStatus, type OrganizationSummary, type OrganizationUsage, type PaginatedResponse, type PlanDetails, type PlanLimits, type ProjectList, type ProjectRef, type ProjectSummary, type RegionInfo, type RequestData, type ResourceList, type ResourceRef, type ResourceSummary, type RetryConfig, type RevisionList, type RevisionRef, type RevisionSummary, type RolePermission, type RolePermissionObject, SDK_VERSION, type SchemaVersionList, type SchemaVersionRef, type SchemaVersionSummary, SecureKeyAuth, SimpleKeyAuth, StaticTokenProvider, type StorageUsage, type TokenProvider, type UnitsUsage, type UsageBreakdown, type UsageMetric, type UserReference, SDK_VERSION as VERSION, createConfig, resolveKey };
727
+ export { type APIFolderList, type APIFolderSummary, type APIInfo, type APIList, type APIRef, AnonymousAuth, type ApiFolderOptions, type ApiFolderRouteDescriptionOptions, type AuthStrategy, type BatchItemError, type BatchUpsertItem, type BatchUpsertResult, type ComponentList, type ComponentRef, type ComponentSummary, type CurrentUsage, DEFAULT_RETRY_CONFIG, DEFAULT_USER_AGENT, type EnvironmentList, type EnvironmentRef, type EnvironmentSummary, type FieldList, type FieldSummary, type FluxAPIKeyList, type FluxAPIKeyRef, type FluxAPIKeySummary, FluxClient, type FluxClientOptions, type FluxRoleList, type FluxRoleRef, type FluxRoleSummary, type FolderList, type FolderRef, type FolderSummary, FoxnoseAPIError, FoxnoseAuthError, type FoxnoseConfig, FoxnoseError, FoxnoseTransportError, HttpTransport, JWTAuth, type LocaleList, type LocaleSummary, type ManagementAPIKeyList, type ManagementAPIKeyRef, type ManagementAPIKeySummary, ManagementClient, type ManagementClientOptions, type ManagementRoleList, type ManagementRoleRef, type ManagementRoleSummary, type OrgRef, type OrganizationList, type OrganizationOwner, type OrganizationPlanStatus, type OrganizationSummary, type OrganizationUsage, type PaginatedResponse, type PlanDetails, type PlanLimits, type ProjectList, type ProjectRef, type ProjectSummary, type RegionInfo, type RequestData, type ResourceList, type ResourceRef, type ResourceSummary, type RetryConfig, type RevisionList, type RevisionRef, type RevisionSummary, type RolePermission, type RolePermissionObject, SDK_VERSION, type SchemaVersionList, type SchemaVersionRef, type SchemaVersionSummary, SecureKeyAuth, SimpleKeyAuth, StaticTokenProvider, type StorageUsage, type TokenProvider, type UnitsUsage, type UsageBreakdown, type UsageMetric, type UserReference, SDK_VERSION as VERSION, createConfig, resolveKey };
package/dist/index.js CHANGED
@@ -150,7 +150,7 @@ var DEFAULT_RETRY_CONFIG = {
150
150
  statusCodes: [408, 425, 429, 500, 502, 503, 504],
151
151
  methods: ["GET", "HEAD", "OPTIONS", "PUT", "DELETE"]
152
152
  };
153
- var SDK_VERSION = "0.1.1";
153
+ var SDK_VERSION = "0.2.1";
154
154
  var DEFAULT_USER_AGENT = `foxnose-sdk-js/${SDK_VERSION}`;
155
155
  function createConfig(options) {
156
156
  if (!options.baseUrl) {
@@ -366,9 +366,7 @@ function resolveKey(value) {
366
366
  if (value && typeof value === "object" && "key" in value && typeof value.key === "string") {
367
367
  return value.key;
368
368
  }
369
- throw new TypeError(
370
- `Expected a string or an object with a 'key' attribute, got ${typeof value}`
371
- );
369
+ throw new TypeError(`Expected a string or an object with a 'key' attribute, got ${typeof value}`);
372
370
  }
373
371
 
374
372
  // src/management/paths.ts
@@ -566,9 +564,21 @@ var ManagementClient = class {
566
564
  const aKey = resolveKey(apiKey);
567
565
  const fKey = resolveKey(folderKey);
568
566
  const body = { folder: fKey };
569
- if (options?.allowedMethods) {
567
+ if (options?.allowedMethods !== void 0) {
570
568
  body.allowed_methods = options.allowedMethods;
571
569
  }
570
+ if (options?.descriptionGetOne !== void 0) {
571
+ body.description_get_one = options.descriptionGetOne;
572
+ }
573
+ if (options?.descriptionGetMany !== void 0) {
574
+ body.description_get_many = options.descriptionGetMany;
575
+ }
576
+ if (options?.descriptionSearch !== void 0) {
577
+ body.description_search = options.descriptionSearch;
578
+ }
579
+ if (options?.descriptionSchema !== void 0) {
580
+ body.description_schema = options.descriptionSchema;
581
+ }
572
582
  return this.request("POST", `${this.paths.apiFoldersRoot(aKey)}/`, { jsonBody: body });
573
583
  }
574
584
  async getApiFolder(apiKey, folderKey) {
@@ -580,9 +590,21 @@ var ManagementClient = class {
580
590
  const aKey = resolveKey(apiKey);
581
591
  const fKey = resolveKey(folderKey);
582
592
  const body = {};
583
- if (options?.allowedMethods) {
593
+ if (options?.allowedMethods !== void 0) {
584
594
  body.allowed_methods = options.allowedMethods;
585
595
  }
596
+ if (options?.descriptionGetOne !== void 0) {
597
+ body.description_get_one = options.descriptionGetOne;
598
+ }
599
+ if (options?.descriptionGetMany !== void 0) {
600
+ body.description_get_many = options.descriptionGetMany;
601
+ }
602
+ if (options?.descriptionSearch !== void 0) {
603
+ body.description_search = options.descriptionSearch;
604
+ }
605
+ if (options?.descriptionSchema !== void 0) {
606
+ body.description_schema = options.descriptionSchema;
607
+ }
586
608
  return this.request("PUT", `${this.paths.apiFoldersRoot(aKey)}/${fKey}/`, {
587
609
  jsonBody: body
588
610
  });
@@ -703,11 +725,10 @@ var ManagementClient = class {
703
725
  }
704
726
  async deleteFluxRolePermission(roleKey, contentType) {
705
727
  const key = resolveKey(roleKey);
706
- await this.request(
707
- "DELETE",
708
- `${this.paths.fluxRolePermissionsRoot(key)}/`,
709
- { params: { content_type: contentType }, parseJson: false }
710
- );
728
+ await this.request("DELETE", `${this.paths.fluxRolePermissionsRoot(key)}/`, {
729
+ params: { content_type: contentType },
730
+ parseJson: false
731
+ });
711
732
  }
712
733
  async replaceFluxRolePermissions(roleKey, permissions) {
713
734
  const key = resolveKey(roleKey);
@@ -823,10 +844,7 @@ var ManagementClient = class {
823
844
  async publishFolderVersion(folderKey, versionKey) {
824
845
  const fKey = resolveKey(folderKey);
825
846
  const vKey = resolveKey(versionKey);
826
- return this.request(
827
- "POST",
828
- `${this.paths.folderVersionsBase(fKey)}/${vKey}/publish/`
829
- );
847
+ return this.request("POST", `${this.paths.folderVersionsBase(fKey)}/${vKey}/publish/`);
830
848
  }
831
849
  // ------------------------------------------------------------------ //
832
850
  // Folder field operations
@@ -846,29 +864,25 @@ var ManagementClient = class {
846
864
  async getFolderField(folderKey, versionKey, fieldPath) {
847
865
  const fKey = resolveKey(folderKey);
848
866
  const vKey = resolveKey(versionKey);
849
- return this.request(
850
- "GET",
851
- `${this.paths.folderSchemaTree(fKey, vKey)}/field/`,
852
- { params: { path: fieldPath } }
853
- );
867
+ return this.request("GET", `${this.paths.folderSchemaTree(fKey, vKey)}/field/`, {
868
+ params: { path: fieldPath }
869
+ });
854
870
  }
855
871
  async updateFolderField(folderKey, versionKey, fieldPath, payload) {
856
872
  const fKey = resolveKey(folderKey);
857
873
  const vKey = resolveKey(versionKey);
858
- return this.request(
859
- "PUT",
860
- `${this.paths.folderSchemaTree(fKey, vKey)}/field/`,
861
- { params: { path: fieldPath }, jsonBody: payload }
862
- );
874
+ return this.request("PUT", `${this.paths.folderSchemaTree(fKey, vKey)}/field/`, {
875
+ params: { path: fieldPath },
876
+ jsonBody: payload
877
+ });
863
878
  }
864
879
  async deleteFolderField(folderKey, versionKey, fieldPath) {
865
880
  const fKey = resolveKey(folderKey);
866
881
  const vKey = resolveKey(versionKey);
867
- await this.request(
868
- "DELETE",
869
- `${this.paths.folderSchemaTree(fKey, vKey)}/field/`,
870
- { params: { path: fieldPath }, parseJson: false }
871
- );
882
+ await this.request("DELETE", `${this.paths.folderSchemaTree(fKey, vKey)}/field/`, {
883
+ params: { path: fieldPath },
884
+ parseJson: false
885
+ });
872
886
  }
873
887
  // ------------------------------------------------------------------ //
874
888
  // Component operations
@@ -923,10 +937,7 @@ var ManagementClient = class {
923
937
  async publishComponentVersion(componentKey, versionKey) {
924
938
  const cKey = resolveKey(componentKey);
925
939
  const vKey = resolveKey(versionKey);
926
- return this.request(
927
- "POST",
928
- `${this.paths.componentVersionsBase(cKey)}/${vKey}/publish/`
929
- );
940
+ return this.request("POST", `${this.paths.componentVersionsBase(cKey)}/${vKey}/publish/`);
930
941
  }
931
942
  async updateComponentVersion(componentKey, versionKey, payload) {
932
943
  const cKey = resolveKey(componentKey);
@@ -960,29 +971,25 @@ var ManagementClient = class {
960
971
  async getComponentField(componentKey, versionKey, fieldPath) {
961
972
  const cKey = resolveKey(componentKey);
962
973
  const vKey = resolveKey(versionKey);
963
- return this.request(
964
- "GET",
965
- `${this.paths.componentSchemaTree(cKey, vKey)}/field/`,
966
- { params: { path: fieldPath } }
967
- );
974
+ return this.request("GET", `${this.paths.componentSchemaTree(cKey, vKey)}/field/`, {
975
+ params: { path: fieldPath }
976
+ });
968
977
  }
969
978
  async updateComponentField(componentKey, versionKey, fieldPath, payload) {
970
979
  const cKey = resolveKey(componentKey);
971
980
  const vKey = resolveKey(versionKey);
972
- return this.request(
973
- "PUT",
974
- `${this.paths.componentSchemaTree(cKey, vKey)}/field/`,
975
- { params: { path: fieldPath }, jsonBody: payload }
976
- );
981
+ return this.request("PUT", `${this.paths.componentSchemaTree(cKey, vKey)}/field/`, {
982
+ params: { path: fieldPath },
983
+ jsonBody: payload
984
+ });
977
985
  }
978
986
  async deleteComponentField(componentKey, versionKey, fieldPath) {
979
987
  const cKey = resolveKey(componentKey);
980
988
  const vKey = resolveKey(versionKey);
981
- await this.request(
982
- "DELETE",
983
- `${this.paths.componentSchemaTree(cKey, vKey)}/field/`,
984
- { params: { path: fieldPath }, parseJson: false }
985
- );
989
+ await this.request("DELETE", `${this.paths.componentSchemaTree(cKey, vKey)}/field/`, {
990
+ params: { path: fieldPath },
991
+ parseJson: false
992
+ });
986
993
  }
987
994
  // ------------------------------------------------------------------ //
988
995
  // Resource operations
@@ -1147,10 +1154,7 @@ var ManagementClient = class {
1147
1154
  const fKey = resolveKey(folderKey);
1148
1155
  const rKey = resolveKey(resourceKey);
1149
1156
  const rvKey = resolveKey(revisionKey);
1150
- return this.request(
1151
- "POST",
1152
- `${this.paths.revisionBase(fKey, rKey)}/${rvKey}/validate/`
1153
- );
1157
+ return this.request("POST", `${this.paths.revisionBase(fKey, rKey)}/${rvKey}/validate/`);
1154
1158
  }
1155
1159
  async getRevisionData(folderKey, resourceKey, revisionKey) {
1156
1160
  const fKey = resolveKey(folderKey);
@@ -1255,11 +1259,9 @@ var ManagementClient = class {
1255
1259
  const oKey = resolveKey(orgKey);
1256
1260
  const pKey = resolveKey(projectKey);
1257
1261
  const eKey = resolveKey(envKey);
1258
- await this.request(
1259
- "POST",
1260
- `${this.paths.environmentRoot(oKey, pKey, eKey)}/toggle/`,
1261
- { jsonBody: { is_enabled: isEnabled } }
1262
- );
1262
+ await this.request("POST", `${this.paths.environmentRoot(oKey, pKey, eKey)}/toggle/`, {
1263
+ jsonBody: { is_enabled: isEnabled }
1264
+ });
1263
1265
  }
1264
1266
  async updateEnvironmentProtection(orgKey, projectKey, envKey, options) {
1265
1267
  const oKey = resolveKey(orgKey);
@@ -1269,11 +1271,9 @@ var ManagementClient = class {
1269
1271
  if (options.protectionReason) {
1270
1272
  body.protection_reason = options.protectionReason;
1271
1273
  }
1272
- return this.request(
1273
- "PATCH",
1274
- `${this.paths.environmentRoot(oKey, pKey, eKey)}/protection/`,
1275
- { jsonBody: body }
1276
- );
1274
+ return this.request("PATCH", `${this.paths.environmentRoot(oKey, pKey, eKey)}/protection/`, {
1275
+ jsonBody: body
1276
+ });
1277
1277
  }
1278
1278
  async clearEnvironmentProtection(orgKey, projectKey, envKey) {
1279
1279
  return this.updateEnvironmentProtection(orgKey, projectKey, envKey, {
@@ -1326,6 +1326,14 @@ var FluxClient = class {
1326
1326
  const path = this.buildPath(folderPath, "/_search");
1327
1327
  return this.transport.request("POST", path, { jsonBody: body });
1328
1328
  }
1329
+ async getRouter() {
1330
+ const path = `/${this.apiPrefix}/_router`;
1331
+ return this.transport.request("GET", path);
1332
+ }
1333
+ async getSchema(folderPath) {
1334
+ const path = this.buildPath(folderPath, "/_schema");
1335
+ return this.transport.request("GET", path);
1336
+ }
1329
1337
  close() {
1330
1338
  this.transport.close();
1331
1339
  }