@cobaltio/cobalt-js 9.2.0 → 9.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/cobalt.d.ts +2 -1
- package/cobalt.js +3 -4
- package/cobalt.ts +4 -2
- package/docs/classes/Cobalt.html +24 -23
- package/docs/enums/AuthStatus.html +2 -2
- package/docs/enums/AuthType.html +2 -2
- package/docs/interfaces/Application.html +14 -14
- package/docs/interfaces/CobaltOptions.html +3 -3
- package/docs/interfaces/Config.html +2 -2
- package/docs/interfaces/ConfigField.html +4 -4
- package/docs/interfaces/ConfigPayload.html +4 -4
- package/docs/interfaces/ConfigWorkflow.html +2 -2
- package/docs/interfaces/ExecuteWorkflowPayload.html +5 -5
- package/docs/interfaces/Execution.html +2 -2
- package/docs/interfaces/ExecutionFilters.html +8 -8
- package/docs/interfaces/GetExecutionsParams.html +8 -8
- package/docs/interfaces/InputField.html +9 -9
- package/docs/interfaces/Label.html +3 -3
- package/docs/interfaces/PublicWorkflow.html +8 -8
- package/docs/interfaces/PublicWorkflowPayload.html +4 -4
- package/docs/interfaces/PublicWorkflowsPayload.html +6 -6
- package/docs/interfaces/RuleOptions.html +2 -2
- package/docs/interfaces/UpdateConfigPayload.html +5 -5
- package/docs/interfaces/WorkflowPayload.html +4 -4
- package/docs/interfaces/WorkflowPayloadResponse.html +2 -2
- package/docs/llms.txt +195 -194
- package/docs/types/ExecutionSource.html +1 -1
- package/docs/types/ExecutionStatus.html +1 -1
- package/docs/types/ExecutionType.html +1 -1
- package/package.json +1 -1
package/cobalt.d.ts
CHANGED
|
@@ -435,9 +435,10 @@ declare class Cobalt {
|
|
|
435
435
|
* Returns the specified config.
|
|
436
436
|
* @param {String} slug The application slug.
|
|
437
437
|
* @param {String} [configId] The unique ID of the config.
|
|
438
|
+
* @param {Boolean} [excludeOptions] Whether to exclude the options from the fields in the response.
|
|
438
439
|
* @returns {Promise<Config>} The specified config.
|
|
439
440
|
*/
|
|
440
|
-
getConfig(slug: string, configId: string): Promise<Config>;
|
|
441
|
+
getConfig(slug: string, configId: string, excludeOptions?: boolean): Promise<Config>;
|
|
441
442
|
/**
|
|
442
443
|
* Update the specified config.
|
|
443
444
|
* @param {UpdateConfigPayload} payload The update payload.
|
package/cobalt.js
CHANGED
|
@@ -317,14 +317,13 @@ class Cobalt {
|
|
|
317
317
|
* Returns the specified config.
|
|
318
318
|
* @param {String} slug The application slug.
|
|
319
319
|
* @param {String} [configId] The unique ID of the config.
|
|
320
|
+
* @param {Boolean} [excludeOptions] Whether to exclude the options from the fields in the response.
|
|
320
321
|
* @returns {Promise<Config>} The specified config.
|
|
321
322
|
*/
|
|
322
|
-
getConfig(slug, configId) {
|
|
323
|
+
getConfig(slug, configId, excludeOptions) {
|
|
323
324
|
return __awaiter(this, void 0, void 0, function* () {
|
|
324
325
|
const res = yield fetch(`${this.baseUrl}/api/v2/f-sdk/slug/${slug}/config${configId ? `/${configId}` : ""}`, {
|
|
325
|
-
headers: {
|
|
326
|
-
authorization: `Bearer ${this.token}`,
|
|
327
|
-
},
|
|
326
|
+
headers: Object.assign({ authorization: `Bearer ${this.token}` }, (excludeOptions ? { disable_field_options: "true" } : {})),
|
|
328
327
|
});
|
|
329
328
|
if (res.status >= 400 && res.status < 600) {
|
|
330
329
|
const error = yield res.json();
|
package/cobalt.ts
CHANGED
|
@@ -680,12 +680,14 @@ class Cobalt {
|
|
|
680
680
|
* Returns the specified config.
|
|
681
681
|
* @param {String} slug The application slug.
|
|
682
682
|
* @param {String} [configId] The unique ID of the config.
|
|
683
|
+
* @param {Boolean} [excludeOptions] Whether to exclude the options from the fields in the response.
|
|
683
684
|
* @returns {Promise<Config>} The specified config.
|
|
684
685
|
*/
|
|
685
|
-
async getConfig(slug: string, configId: string): Promise<Config> {
|
|
686
|
+
async getConfig(slug: string, configId: string, excludeOptions?: boolean): Promise<Config> {
|
|
686
687
|
const res = await fetch(`${this.baseUrl}/api/v2/f-sdk/slug/${slug}/config${configId ? `/${configId}` : ""}`, {
|
|
687
688
|
headers: {
|
|
688
689
|
authorization: `Bearer ${this.token}`,
|
|
690
|
+
...(excludeOptions ? { disable_field_options: "true" } : {}),
|
|
689
691
|
},
|
|
690
692
|
});
|
|
691
693
|
|
|
@@ -863,7 +865,7 @@ class Cobalt {
|
|
|
863
865
|
const value = rest[key];
|
|
864
866
|
if (value !== undefined && value !== "") query.set(key, String(value));
|
|
865
867
|
}
|
|
866
|
-
|
|
868
|
+
|
|
867
869
|
const res = await fetch(`${this.baseUrl}/api/v2/public/workflow?${query}`, {
|
|
868
870
|
headers: {
|
|
869
871
|
authorization: `Bearer ${this.token}`,
|