contentful-management 11.44.0 → 11.45.0-beta.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/contentful-management.browser.js +467 -276
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +447 -271
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/adapters/REST/endpoints/function-log.js +22 -0
- package/dist/es-modules/adapters/REST/endpoints/function.js +6 -2
- package/dist/es-modules/adapters/REST/endpoints/index.js +2 -0
- package/dist/es-modules/common-types.js +4 -0
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/create-environment-api.js +119 -0
- package/dist/es-modules/create-organization-api.js +54 -0
- package/dist/es-modules/entities/function-log.js +21 -0
- package/dist/es-modules/entities/function.js +45 -8
- package/dist/es-modules/entities/index.js +2 -0
- package/dist/es-modules/plain/entities/function-log.js +1 -0
- package/dist/es-modules/plain/plain-client.js +4 -0
- package/dist/typings/adapters/REST/endpoints/function-log.d.ts +3 -0
- package/dist/typings/adapters/REST/endpoints/index.d.ts +2 -0
- package/dist/typings/common-types.d.ts +50 -2
- package/dist/typings/create-environment-api.d.ts +78 -1
- package/dist/typings/create-organization-api.d.ts +29 -1
- package/dist/typings/entities/function-log.d.ts +46 -0
- package/dist/typings/entities/function.d.ts +2 -10
- package/dist/typings/entities/index.d.ts +2 -0
- package/dist/typings/plain/common-types.d.ts +2 -0
- package/dist/typings/plain/entities/function-log.d.ts +39 -0
- package/dist/typings/plain/entities/function.d.ts +5 -3
- package/package.json +1 -1
- package/dist/es-modules/create-function-api.js +0 -115
- package/dist/typings/create-function-api.d.ts +0 -78
|
@@ -2251,6 +2251,49 @@ var del = function del(http, params) {
|
|
|
2251
2251
|
|
|
2252
2252
|
/***/ }),
|
|
2253
2253
|
|
|
2254
|
+
/***/ "./adapters/REST/endpoints/function-log.ts":
|
|
2255
|
+
/*!*************************************************!*\
|
|
2256
|
+
!*** ./adapters/REST/endpoints/function-log.ts ***!
|
|
2257
|
+
\*************************************************/
|
|
2258
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2259
|
+
|
|
2260
|
+
"use strict";
|
|
2261
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2262
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2263
|
+
/* harmony export */ get: function() { return /* binding */ get; },
|
|
2264
|
+
/* harmony export */ getMany: function() { return /* binding */ getMany; }
|
|
2265
|
+
/* harmony export */ });
|
|
2266
|
+
/* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
|
|
2267
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2268
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2269
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2270
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2271
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
2272
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2273
|
+
|
|
2274
|
+
var FunctionLogAlphaHeaders = {
|
|
2275
|
+
'x-contentful-enable-alpha-feature': 'function-logs'
|
|
2276
|
+
};
|
|
2277
|
+
var baseURL = function baseURL(params) {
|
|
2278
|
+
return "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/app_installations/").concat(params.appInstallationId, "/functions/").concat(params.functionId, "/logs");
|
|
2279
|
+
};
|
|
2280
|
+
var getURL = function getURL(params) {
|
|
2281
|
+
return "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/app_installations/").concat(params.appInstallationId, "/functions/").concat(params.functionId, "/logs/").concat(params.logId);
|
|
2282
|
+
};
|
|
2283
|
+
var get = function get(http, params) {
|
|
2284
|
+
return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, getURL(params), {
|
|
2285
|
+
headers: _objectSpread({}, FunctionLogAlphaHeaders)
|
|
2286
|
+
});
|
|
2287
|
+
};
|
|
2288
|
+
var getMany = function getMany(http, params) {
|
|
2289
|
+
return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, baseURL(params), {
|
|
2290
|
+
params: params.query,
|
|
2291
|
+
headers: _objectSpread({}, FunctionLogAlphaHeaders)
|
|
2292
|
+
});
|
|
2293
|
+
};
|
|
2294
|
+
|
|
2295
|
+
/***/ }),
|
|
2296
|
+
|
|
2254
2297
|
/***/ "./adapters/REST/endpoints/function.ts":
|
|
2255
2298
|
/*!*********************************************!*\
|
|
2256
2299
|
!*** ./adapters/REST/endpoints/function.ts ***!
|
|
@@ -2280,10 +2323,14 @@ var get = function get(http, params) {
|
|
|
2280
2323
|
return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, getFunctionUrl(params));
|
|
2281
2324
|
};
|
|
2282
2325
|
var getMany = function getMany(http, params) {
|
|
2283
|
-
return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, getManyUrl(params)
|
|
2326
|
+
return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, getManyUrl(params), {
|
|
2327
|
+
params: params.query
|
|
2328
|
+
});
|
|
2284
2329
|
};
|
|
2285
2330
|
var getManyForEnvironment = function getManyForEnvironment(http, params) {
|
|
2286
|
-
return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, getFunctionsEnvURL(params)
|
|
2331
|
+
return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, getFunctionsEnvURL(params), {
|
|
2332
|
+
params: params.query
|
|
2333
|
+
});
|
|
2287
2334
|
};
|
|
2288
2335
|
|
|
2289
2336
|
/***/ }),
|
|
@@ -2378,39 +2425,41 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2378
2425
|
/* harmony import */ var _environment_template_installation__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./environment-template-installation */ "./adapters/REST/endpoints/environment-template-installation.ts");
|
|
2379
2426
|
/* harmony import */ var _extension__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./extension */ "./adapters/REST/endpoints/extension.ts");
|
|
2380
2427
|
/* harmony import */ var _function__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./function */ "./adapters/REST/endpoints/function.ts");
|
|
2381
|
-
/* harmony import */ var
|
|
2382
|
-
/* harmony import */ var
|
|
2383
|
-
/* harmony import */ var
|
|
2384
|
-
/* harmony import */ var
|
|
2385
|
-
/* harmony import */ var
|
|
2386
|
-
/* harmony import */ var
|
|
2387
|
-
/* harmony import */ var
|
|
2388
|
-
/* harmony import */ var
|
|
2389
|
-
/* harmony import */ var
|
|
2390
|
-
/* harmony import */ var
|
|
2391
|
-
/* harmony import */ var
|
|
2392
|
-
/* harmony import */ var
|
|
2393
|
-
/* harmony import */ var
|
|
2394
|
-
/* harmony import */ var
|
|
2395
|
-
/* harmony import */ var
|
|
2396
|
-
/* harmony import */ var
|
|
2397
|
-
/* harmony import */ var
|
|
2398
|
-
/* harmony import */ var
|
|
2399
|
-
/* harmony import */ var
|
|
2400
|
-
/* harmony import */ var
|
|
2401
|
-
/* harmony import */ var
|
|
2402
|
-
/* harmony import */ var
|
|
2403
|
-
/* harmony import */ var
|
|
2404
|
-
/* harmony import */ var
|
|
2405
|
-
/* harmony import */ var
|
|
2406
|
-
/* harmony import */ var
|
|
2407
|
-
/* harmony import */ var
|
|
2408
|
-
/* harmony import */ var
|
|
2409
|
-
/* harmony import */ var
|
|
2410
|
-
/* harmony import */ var
|
|
2411
|
-
/* harmony import */ var
|
|
2412
|
-
/* harmony import */ var
|
|
2413
|
-
/* harmony import */ var
|
|
2428
|
+
/* harmony import */ var _function_log__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./function-log */ "./adapters/REST/endpoints/function-log.ts");
|
|
2429
|
+
/* harmony import */ var _http__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./http */ "./adapters/REST/endpoints/http.ts");
|
|
2430
|
+
/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./locale */ "./adapters/REST/endpoints/locale.ts");
|
|
2431
|
+
/* harmony import */ var _organization__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./organization */ "./adapters/REST/endpoints/organization.ts");
|
|
2432
|
+
/* harmony import */ var _organization_invitation__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./organization-invitation */ "./adapters/REST/endpoints/organization-invitation.ts");
|
|
2433
|
+
/* harmony import */ var _organization_membership__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./organization-membership */ "./adapters/REST/endpoints/organization-membership.ts");
|
|
2434
|
+
/* harmony import */ var _personal_access_token__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./personal-access-token */ "./adapters/REST/endpoints/personal-access-token.ts");
|
|
2435
|
+
/* harmony import */ var _preview_api_key__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./preview-api-key */ "./adapters/REST/endpoints/preview-api-key.ts");
|
|
2436
|
+
/* harmony import */ var _release__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./release */ "./adapters/REST/endpoints/release.ts");
|
|
2437
|
+
/* harmony import */ var _release_action__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./release-action */ "./adapters/REST/endpoints/release-action.ts");
|
|
2438
|
+
/* harmony import */ var _resource__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./resource */ "./adapters/REST/endpoints/resource.ts");
|
|
2439
|
+
/* harmony import */ var _resource_provider__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./resource-provider */ "./adapters/REST/endpoints/resource-provider.ts");
|
|
2440
|
+
/* harmony import */ var _resource_type__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./resource-type */ "./adapters/REST/endpoints/resource-type.ts");
|
|
2441
|
+
/* harmony import */ var _role__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./role */ "./adapters/REST/endpoints/role.ts");
|
|
2442
|
+
/* harmony import */ var _scheduled_action__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./scheduled-action */ "./adapters/REST/endpoints/scheduled-action.ts");
|
|
2443
|
+
/* harmony import */ var _snapshot__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./snapshot */ "./adapters/REST/endpoints/snapshot.ts");
|
|
2444
|
+
/* harmony import */ var _space__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./space */ "./adapters/REST/endpoints/space.ts");
|
|
2445
|
+
/* harmony import */ var _space_member__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./space-member */ "./adapters/REST/endpoints/space-member.ts");
|
|
2446
|
+
/* harmony import */ var _space_membership__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./space-membership */ "./adapters/REST/endpoints/space-membership.ts");
|
|
2447
|
+
/* harmony import */ var _tag__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./tag */ "./adapters/REST/endpoints/tag.ts");
|
|
2448
|
+
/* harmony import */ var _task__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./task */ "./adapters/REST/endpoints/task.ts");
|
|
2449
|
+
/* harmony import */ var _team__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./team */ "./adapters/REST/endpoints/team.ts");
|
|
2450
|
+
/* harmony import */ var _team_membership__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./team-membership */ "./adapters/REST/endpoints/team-membership.ts");
|
|
2451
|
+
/* harmony import */ var _team_space_membership__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./team-space-membership */ "./adapters/REST/endpoints/team-space-membership.ts");
|
|
2452
|
+
/* harmony import */ var _ui_config__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./ui-config */ "./adapters/REST/endpoints/ui-config.ts");
|
|
2453
|
+
/* harmony import */ var _upload__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./upload */ "./adapters/REST/endpoints/upload.ts");
|
|
2454
|
+
/* harmony import */ var _upload_credentials__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./upload-credentials */ "./adapters/REST/endpoints/upload-credentials.ts");
|
|
2455
|
+
/* harmony import */ var _usage__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./usage */ "./adapters/REST/endpoints/usage.ts");
|
|
2456
|
+
/* harmony import */ var _user__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./user */ "./adapters/REST/endpoints/user.ts");
|
|
2457
|
+
/* harmony import */ var _user_ui_config__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./user-ui-config */ "./adapters/REST/endpoints/user-ui-config.ts");
|
|
2458
|
+
/* harmony import */ var _webhook__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./webhook */ "./adapters/REST/endpoints/webhook.ts");
|
|
2459
|
+
/* harmony import */ var _workflow__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./workflow */ "./adapters/REST/endpoints/workflow.ts");
|
|
2460
|
+
/* harmony import */ var _workflow_definition__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./workflow-definition */ "./adapters/REST/endpoints/workflow-definition.ts");
|
|
2461
|
+
/* harmony import */ var _workflows_changelog__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./workflows-changelog */ "./adapters/REST/endpoints/workflows-changelog.ts");
|
|
2462
|
+
|
|
2414
2463
|
|
|
2415
2464
|
|
|
2416
2465
|
|
|
@@ -2502,40 +2551,41 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2502
2551
|
EnvironmentTemplateInstallation: _environment_template_installation__WEBPACK_IMPORTED_MODULE_26__,
|
|
2503
2552
|
Extension: _extension__WEBPACK_IMPORTED_MODULE_27__,
|
|
2504
2553
|
Function: _function__WEBPACK_IMPORTED_MODULE_28__,
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2554
|
+
FunctionLog: _function_log__WEBPACK_IMPORTED_MODULE_29__,
|
|
2555
|
+
Http: _http__WEBPACK_IMPORTED_MODULE_30__,
|
|
2556
|
+
Locale: _locale__WEBPACK_IMPORTED_MODULE_31__,
|
|
2557
|
+
Organization: _organization__WEBPACK_IMPORTED_MODULE_32__,
|
|
2558
|
+
OrganizationInvitation: _organization_invitation__WEBPACK_IMPORTED_MODULE_33__,
|
|
2559
|
+
OrganizationMembership: _organization_membership__WEBPACK_IMPORTED_MODULE_34__,
|
|
2560
|
+
PersonalAccessToken: _personal_access_token__WEBPACK_IMPORTED_MODULE_35__,
|
|
2511
2561
|
AccessToken: _access_token__WEBPACK_IMPORTED_MODULE_0__,
|
|
2512
|
-
PreviewApiKey:
|
|
2513
|
-
Release:
|
|
2514
|
-
ReleaseAction:
|
|
2515
|
-
Resource:
|
|
2516
|
-
ResourceProvider:
|
|
2517
|
-
ResourceType:
|
|
2518
|
-
Role:
|
|
2519
|
-
ScheduledAction:
|
|
2520
|
-
Snapshot:
|
|
2521
|
-
Space:
|
|
2522
|
-
SpaceMember:
|
|
2523
|
-
SpaceMembership:
|
|
2524
|
-
Tag:
|
|
2525
|
-
Task:
|
|
2526
|
-
Team:
|
|
2527
|
-
TeamMembership:
|
|
2528
|
-
TeamSpaceMembership:
|
|
2529
|
-
UIConfig:
|
|
2530
|
-
Upload:
|
|
2531
|
-
UploadCredential:
|
|
2532
|
-
Usage:
|
|
2533
|
-
User:
|
|
2534
|
-
UserUIConfig:
|
|
2535
|
-
Webhook:
|
|
2536
|
-
WorkflowDefinition:
|
|
2537
|
-
Workflow:
|
|
2538
|
-
WorkflowsChangelog:
|
|
2562
|
+
PreviewApiKey: _preview_api_key__WEBPACK_IMPORTED_MODULE_36__,
|
|
2563
|
+
Release: _release__WEBPACK_IMPORTED_MODULE_37__,
|
|
2564
|
+
ReleaseAction: _release_action__WEBPACK_IMPORTED_MODULE_38__,
|
|
2565
|
+
Resource: _resource__WEBPACK_IMPORTED_MODULE_39__,
|
|
2566
|
+
ResourceProvider: _resource_provider__WEBPACK_IMPORTED_MODULE_40__,
|
|
2567
|
+
ResourceType: _resource_type__WEBPACK_IMPORTED_MODULE_41__,
|
|
2568
|
+
Role: _role__WEBPACK_IMPORTED_MODULE_42__,
|
|
2569
|
+
ScheduledAction: _scheduled_action__WEBPACK_IMPORTED_MODULE_43__,
|
|
2570
|
+
Snapshot: _snapshot__WEBPACK_IMPORTED_MODULE_44__,
|
|
2571
|
+
Space: _space__WEBPACK_IMPORTED_MODULE_45__,
|
|
2572
|
+
SpaceMember: _space_member__WEBPACK_IMPORTED_MODULE_46__,
|
|
2573
|
+
SpaceMembership: _space_membership__WEBPACK_IMPORTED_MODULE_47__,
|
|
2574
|
+
Tag: _tag__WEBPACK_IMPORTED_MODULE_48__,
|
|
2575
|
+
Task: _task__WEBPACK_IMPORTED_MODULE_49__,
|
|
2576
|
+
Team: _team__WEBPACK_IMPORTED_MODULE_50__,
|
|
2577
|
+
TeamMembership: _team_membership__WEBPACK_IMPORTED_MODULE_51__,
|
|
2578
|
+
TeamSpaceMembership: _team_space_membership__WEBPACK_IMPORTED_MODULE_52__,
|
|
2579
|
+
UIConfig: _ui_config__WEBPACK_IMPORTED_MODULE_53__,
|
|
2580
|
+
Upload: _upload__WEBPACK_IMPORTED_MODULE_54__,
|
|
2581
|
+
UploadCredential: _upload_credentials__WEBPACK_IMPORTED_MODULE_55__,
|
|
2582
|
+
Usage: _usage__WEBPACK_IMPORTED_MODULE_56__,
|
|
2583
|
+
User: _user__WEBPACK_IMPORTED_MODULE_57__,
|
|
2584
|
+
UserUIConfig: _user_ui_config__WEBPACK_IMPORTED_MODULE_58__,
|
|
2585
|
+
Webhook: _webhook__WEBPACK_IMPORTED_MODULE_59__,
|
|
2586
|
+
WorkflowDefinition: _workflow_definition__WEBPACK_IMPORTED_MODULE_61__,
|
|
2587
|
+
Workflow: _workflow__WEBPACK_IMPORTED_MODULE_60__,
|
|
2588
|
+
WorkflowsChangelog: _workflows_changelog__WEBPACK_IMPORTED_MODULE_62__
|
|
2539
2589
|
});
|
|
2540
2590
|
|
|
2541
2591
|
/***/ }),
|
|
@@ -4601,6 +4651,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4601
4651
|
|
|
4602
4652
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
4603
4653
|
|
|
4654
|
+
// Base interface for shared fields
|
|
4655
|
+
|
|
4656
|
+
// Interfaces for each “exclusive” shape
|
|
4657
|
+
|
|
4604
4658
|
/**
|
|
4605
4659
|
* @private
|
|
4606
4660
|
*/
|
|
@@ -6726,6 +6780,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6726
6780
|
/* harmony import */ var _entities_ui_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./entities/ui-config */ "./entities/ui-config.ts");
|
|
6727
6781
|
/* harmony import */ var _entities_user_ui_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./entities/user-ui-config */ "./entities/user-ui-config.ts");
|
|
6728
6782
|
/* harmony import */ var _entities_environment_template_installation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./entities/environment-template-installation */ "./entities/environment-template-installation.ts");
|
|
6783
|
+
/* harmony import */ var _entities_function__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./entities/function */ "./entities/function.ts");
|
|
6784
|
+
/* harmony import */ var _entities_function_log__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./entities/function-log */ "./entities/function-log.ts");
|
|
6729
6785
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
6730
6786
|
var _excluded = ["installationId"];
|
|
6731
6787
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -6747,6 +6803,8 @@ function _asyncToGenerator(n) { return function () { var t = this, e = arguments
|
|
|
6747
6803
|
|
|
6748
6804
|
|
|
6749
6805
|
|
|
6806
|
+
|
|
6807
|
+
|
|
6750
6808
|
/**
|
|
6751
6809
|
* @private
|
|
6752
6810
|
*/
|
|
@@ -8449,6 +8507,129 @@ function createEnvironmentApi(makeRequest) {
|
|
|
8449
8507
|
return wrapAppAccessToken(makeRequest, payload);
|
|
8450
8508
|
});
|
|
8451
8509
|
},
|
|
8510
|
+
/**
|
|
8511
|
+
* Gets a collection of Functions for a given environment
|
|
8512
|
+
* @param appInstallationId
|
|
8513
|
+
* @param {import('../common-types').AcceptsQueryOptions} query - optional query parameter for filtering functions by action
|
|
8514
|
+
* @return Promise containing wrapped collection of Functions in an environment
|
|
8515
|
+
* @example ```javascript
|
|
8516
|
+
* const contentful = require('contentful-management')
|
|
8517
|
+
*
|
|
8518
|
+
* const client = contentful.createClient({
|
|
8519
|
+
* accessToken: '<content_management_api_key>'
|
|
8520
|
+
* })
|
|
8521
|
+
*
|
|
8522
|
+
* client
|
|
8523
|
+
* .getSpace('<space-id>')
|
|
8524
|
+
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
8525
|
+
* .then((environment) => environment.getFunctionsForEnvironment('<app-installation-id>', { 'accepts[all]': '<action>' }))
|
|
8526
|
+
* .then((functions) => console.log(functions.items))
|
|
8527
|
+
* .catch(console.error)
|
|
8528
|
+
* ```
|
|
8529
|
+
*/
|
|
8530
|
+
getFunctionsForEnvironment: function getFunctionsForEnvironment(appInstallationId, query) {
|
|
8531
|
+
var raw = this.toPlainObject();
|
|
8532
|
+
return makeRequest({
|
|
8533
|
+
entityType: 'Function',
|
|
8534
|
+
action: 'getManyForEnvironment',
|
|
8535
|
+
params: {
|
|
8536
|
+
spaceId: raw.sys.space.sys.id,
|
|
8537
|
+
environmentId: raw.sys.id,
|
|
8538
|
+
appInstallationId: appInstallationId,
|
|
8539
|
+
query: query
|
|
8540
|
+
}
|
|
8541
|
+
}).then(function (data) {
|
|
8542
|
+
return (0,_entities_function__WEBPACK_IMPORTED_MODULE_8__.wrapFunctionCollection)(makeRequest, data);
|
|
8543
|
+
});
|
|
8544
|
+
},
|
|
8545
|
+
/**
|
|
8546
|
+
* Gets a collection of FunctionLogs for a given app installation id and FunctionId
|
|
8547
|
+
* @param appInstallationId
|
|
8548
|
+
* @param functionId
|
|
8549
|
+
* @param {import('../common-types').CursorBasedParams} query - optional query parameter for pagination (limit, nextPage, prevPage)
|
|
8550
|
+
* @return Promise containing wrapped collection of FunctionLogs
|
|
8551
|
+
* * @example ```javascript
|
|
8552
|
+
* const contentful = require('contentful-management')
|
|
8553
|
+
*
|
|
8554
|
+
* const client = contentful.createClient({
|
|
8555
|
+
* accessToken: '<content_management_api_key>'
|
|
8556
|
+
* })
|
|
8557
|
+
*
|
|
8558
|
+
* client
|
|
8559
|
+
* .getSpace('<space-id>')
|
|
8560
|
+
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
8561
|
+
* .then((environment) =>
|
|
8562
|
+
* environment.getFunctionLogs(
|
|
8563
|
+
* '<app-installation-id>',
|
|
8564
|
+
* '<function-id>',
|
|
8565
|
+
* { limit: 10 },
|
|
8566
|
+
* )
|
|
8567
|
+
* )
|
|
8568
|
+
* .then((functionLogs) => console.log(functionLog.items))
|
|
8569
|
+
* .catch(console.error)
|
|
8570
|
+
* ```
|
|
8571
|
+
*/
|
|
8572
|
+
getFunctionLogs: function getFunctionLogs(appInstallationId, functionId, query) {
|
|
8573
|
+
var raw = this.toPlainObject();
|
|
8574
|
+
return makeRequest({
|
|
8575
|
+
entityType: 'FunctionLog',
|
|
8576
|
+
action: 'getMany',
|
|
8577
|
+
params: {
|
|
8578
|
+
spaceId: raw.sys.space.sys.id,
|
|
8579
|
+
environmentId: raw.sys.id,
|
|
8580
|
+
appInstallationId: appInstallationId,
|
|
8581
|
+
functionId: functionId,
|
|
8582
|
+
query: query ? (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({
|
|
8583
|
+
query: query
|
|
8584
|
+
}).params : undefined
|
|
8585
|
+
}
|
|
8586
|
+
}).then(function (data) {
|
|
8587
|
+
return (0,_entities_function_log__WEBPACK_IMPORTED_MODULE_9__.wrapFunctionLogCollection)(makeRequest, data);
|
|
8588
|
+
});
|
|
8589
|
+
},
|
|
8590
|
+
/**
|
|
8591
|
+
* Gets a FunctionLog by appInstallationId, functionId and logId
|
|
8592
|
+
* @param appInstallationId
|
|
8593
|
+
* @param functionId
|
|
8594
|
+
* @param logId
|
|
8595
|
+
* @return Promise containing a wrapped FunctionLog
|
|
8596
|
+
* @example ```javascript
|
|
8597
|
+
* const contentful = require('contentful-management')
|
|
8598
|
+
*
|
|
8599
|
+
* const client = contentful.createClient({
|
|
8600
|
+
* accessToken: '<content_management_api_key>'
|
|
8601
|
+
* })
|
|
8602
|
+
*
|
|
8603
|
+
* client
|
|
8604
|
+
* .getSpace(<space-id>)
|
|
8605
|
+
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
8606
|
+
* .then((environment) =>
|
|
8607
|
+
* environment.getFunctionLog(
|
|
8608
|
+
* '<app-installation-id>',
|
|
8609
|
+
* '<function-id>',
|
|
8610
|
+
* '<log-id>'
|
|
8611
|
+
* )
|
|
8612
|
+
* )
|
|
8613
|
+
* .then((functionLog) => console.log(functionLog))
|
|
8614
|
+
* .catch(console.error)
|
|
8615
|
+
* ```
|
|
8616
|
+
*/
|
|
8617
|
+
getFunctionLog: function getFunctionLog(appInstallationId, functionId, logId) {
|
|
8618
|
+
var raw = this.toPlainObject();
|
|
8619
|
+
return makeRequest({
|
|
8620
|
+
entityType: 'FunctionLog',
|
|
8621
|
+
action: 'get',
|
|
8622
|
+
params: {
|
|
8623
|
+
spaceId: raw.sys.space.sys.id,
|
|
8624
|
+
environmentId: raw.sys.id,
|
|
8625
|
+
appInstallationId: appInstallationId,
|
|
8626
|
+
functionId: functionId,
|
|
8627
|
+
logId: logId
|
|
8628
|
+
}
|
|
8629
|
+
}).then(function (data) {
|
|
8630
|
+
return (0,_entities_function_log__WEBPACK_IMPORTED_MODULE_9__.wrapFunctionLog)(makeRequest, data);
|
|
8631
|
+
});
|
|
8632
|
+
},
|
|
8452
8633
|
/**
|
|
8453
8634
|
* Gets all snapshots of an entry
|
|
8454
8635
|
* @func getEntrySnapshots
|
|
@@ -9558,141 +9739,6 @@ function createEnvironmentTemplateApi(makeRequest, organizationId) {
|
|
|
9558
9739
|
|
|
9559
9740
|
/***/ }),
|
|
9560
9741
|
|
|
9561
|
-
/***/ "./create-function-api.ts":
|
|
9562
|
-
/*!********************************!*\
|
|
9563
|
-
!*** ./create-function-api.ts ***!
|
|
9564
|
-
\********************************/
|
|
9565
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
9566
|
-
|
|
9567
|
-
"use strict";
|
|
9568
|
-
__webpack_require__.r(__webpack_exports__);
|
|
9569
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9570
|
-
/* harmony export */ "default": function() { return /* binding */ createFunctionApi; }
|
|
9571
|
-
/* harmony export */ });
|
|
9572
|
-
/* harmony import */ var _entities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./entities */ "./entities/index.ts");
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
/**
|
|
9576
|
-
* @private
|
|
9577
|
-
*/
|
|
9578
|
-
|
|
9579
|
-
/**
|
|
9580
|
-
* @private
|
|
9581
|
-
*/
|
|
9582
|
-
function createFunctionApi(makeRequest) {
|
|
9583
|
-
var _entities$func = _entities__WEBPACK_IMPORTED_MODULE_0__["default"].func,
|
|
9584
|
-
wrapFunction = _entities$func.wrapFunction,
|
|
9585
|
-
wrapFunctionCollection = _entities$func.wrapFunctionCollection;
|
|
9586
|
-
return {
|
|
9587
|
-
/**
|
|
9588
|
-
* Gets all Functions for an App Definition
|
|
9589
|
-
* @Param organizationId - Organization ID
|
|
9590
|
-
* @Param appDefinitionId - App Definition ID
|
|
9591
|
-
* @returns a collection of Functions
|
|
9592
|
-
* ```javascript
|
|
9593
|
-
* const contentful = require('contentful-management')
|
|
9594
|
-
*
|
|
9595
|
-
* const client = contentful.createClient({
|
|
9596
|
-
* accessToken: '<content_management_api_key>'
|
|
9597
|
-
* })
|
|
9598
|
-
*
|
|
9599
|
-
* client.function.getMany({
|
|
9600
|
-
* organizationId: <organizationId>,
|
|
9601
|
-
* appDefinitionId: <appDefinitionId>
|
|
9602
|
-
* })
|
|
9603
|
-
* .then((response) => console.log(response.items))
|
|
9604
|
-
* .catch(console.error)
|
|
9605
|
-
* ```
|
|
9606
|
-
*/
|
|
9607
|
-
getManyFunctions: function getManyFunctions() {
|
|
9608
|
-
var raw = this.toPlainObject();
|
|
9609
|
-
return makeRequest({
|
|
9610
|
-
entityType: 'Function',
|
|
9611
|
-
action: 'getMany',
|
|
9612
|
-
params: {
|
|
9613
|
-
appDefinitionId: raw.sys.appDefinition.sys.id,
|
|
9614
|
-
organizationId: raw.sys.organization.sys.id
|
|
9615
|
-
}
|
|
9616
|
-
}).then(function (data) {
|
|
9617
|
-
return wrapFunctionCollection(makeRequest, data);
|
|
9618
|
-
});
|
|
9619
|
-
},
|
|
9620
|
-
/**
|
|
9621
|
-
* Gets a Function by ID
|
|
9622
|
-
* @Param organizationId - Organization ID
|
|
9623
|
-
* @Param appDefinitionId - App Definition ID
|
|
9624
|
-
* @Param functionId - Function ID
|
|
9625
|
-
* @returns a collection of Functions
|
|
9626
|
-
* ```javascript
|
|
9627
|
-
* const contentful = require('contentful-management')
|
|
9628
|
-
*
|
|
9629
|
-
* const client = contentful.createClient({
|
|
9630
|
-
* accessToken: '<content_management_api_key>'
|
|
9631
|
-
* })
|
|
9632
|
-
*
|
|
9633
|
-
* client.function.get({
|
|
9634
|
-
* organizationId: <organizationId>,
|
|
9635
|
-
* appDefinitionId: <appDefinitionId>,
|
|
9636
|
-
* functionId: <functionId>
|
|
9637
|
-
* })
|
|
9638
|
-
* .then((response) => console.log(response.items))
|
|
9639
|
-
* .catch(console.error)
|
|
9640
|
-
* ```
|
|
9641
|
-
*/
|
|
9642
|
-
getFunction: function getFunction(functionId) {
|
|
9643
|
-
var raw = this.toPlainObject();
|
|
9644
|
-
return makeRequest({
|
|
9645
|
-
entityType: 'Function',
|
|
9646
|
-
action: 'get',
|
|
9647
|
-
params: {
|
|
9648
|
-
appDefinitionId: raw.sys.appDefinition.sys.id,
|
|
9649
|
-
organizationId: raw.sys.organization.sys.id,
|
|
9650
|
-
functionId: functionId
|
|
9651
|
-
}
|
|
9652
|
-
}).then(function (data) {
|
|
9653
|
-
return wrapFunction(makeRequest, data);
|
|
9654
|
-
});
|
|
9655
|
-
},
|
|
9656
|
-
/**
|
|
9657
|
-
* Gets all Functions for an Environment
|
|
9658
|
-
* @Param organizationId - Organization ID
|
|
9659
|
-
* @Param appDefinitionId - App Definition ID
|
|
9660
|
-
* @Param functionId - Function ID
|
|
9661
|
-
* @returns a collection of Functions
|
|
9662
|
-
* ```javascript
|
|
9663
|
-
* const contentful = require('contentful-management')
|
|
9664
|
-
*
|
|
9665
|
-
* const client = contentful.createClient({
|
|
9666
|
-
* accessToken: '<content_management_api_key>'
|
|
9667
|
-
* })
|
|
9668
|
-
*
|
|
9669
|
-
* client.function.get({
|
|
9670
|
-
* environmentId: <environmentId>,
|
|
9671
|
-
* spaceId: <spaceId>,
|
|
9672
|
-
* appInstallationId: <appInstallationId>
|
|
9673
|
-
* })
|
|
9674
|
-
* .then((response) => console.log(response.items))
|
|
9675
|
-
* .catch(console.error)
|
|
9676
|
-
* ```
|
|
9677
|
-
*/
|
|
9678
|
-
getManyFunctionsForEnvironment: function getManyFunctionsForEnvironment(spaceId, environmentId, appInstallationId) {
|
|
9679
|
-
return makeRequest({
|
|
9680
|
-
entityType: 'Function',
|
|
9681
|
-
action: 'getManyForEnvironment',
|
|
9682
|
-
params: {
|
|
9683
|
-
spaceId: spaceId,
|
|
9684
|
-
environmentId: environmentId,
|
|
9685
|
-
appInstallationId: appInstallationId
|
|
9686
|
-
}
|
|
9687
|
-
}).then(function (data) {
|
|
9688
|
-
return wrapFunctionCollection(makeRequest, data);
|
|
9689
|
-
});
|
|
9690
|
-
}
|
|
9691
|
-
};
|
|
9692
|
-
}
|
|
9693
|
-
|
|
9694
|
-
/***/ }),
|
|
9695
|
-
|
|
9696
9742
|
/***/ "./create-organization-api.ts":
|
|
9697
9743
|
/*!************************************!*\
|
|
9698
9744
|
!*** ./create-organization-api.ts ***!
|
|
@@ -9758,6 +9804,9 @@ function createOrganizationApi(makeRequest) {
|
|
|
9758
9804
|
var _entities$appAction = _entities__WEBPACK_IMPORTED_MODULE_1__["default"].appAction,
|
|
9759
9805
|
wrapAppAction = _entities$appAction.wrapAppAction,
|
|
9760
9806
|
wrapAppActionCollection = _entities$appAction.wrapAppActionCollection;
|
|
9807
|
+
var _entities$func = _entities__WEBPACK_IMPORTED_MODULE_1__["default"].func,
|
|
9808
|
+
wrapFunction = _entities$func.wrapFunction,
|
|
9809
|
+
wrapFunctionCollection = _entities$func.wrapFunctionCollection;
|
|
9761
9810
|
var wrapRoleCollection = _entities__WEBPACK_IMPORTED_MODULE_1__["default"].role.wrapRoleCollection;
|
|
9762
9811
|
var wrapSpaceCollection = _entities__WEBPACK_IMPORTED_MODULE_1__["default"].space.wrapSpaceCollection;
|
|
9763
9812
|
return {
|
|
@@ -11015,6 +11064,60 @@ function createOrganizationApi(makeRequest) {
|
|
|
11015
11064
|
}).then(function (payload) {
|
|
11016
11065
|
return wrapAppActionCollection(makeRequest, payload);
|
|
11017
11066
|
});
|
|
11067
|
+
},
|
|
11068
|
+
/**
|
|
11069
|
+
* Gets an app function
|
|
11070
|
+
* @param appDefinitionId
|
|
11071
|
+
* @param functionId
|
|
11072
|
+
* @returns Promise for a Function
|
|
11073
|
+
* @example ```javascript
|
|
11074
|
+
* const contentful = require('contentful-management')
|
|
11075
|
+
* const client = contentful.createClient({
|
|
11076
|
+
* accessToken: '<content_management_api_key>'
|
|
11077
|
+
* })
|
|
11078
|
+
* const org = await client.getOrganization('<org_id>')
|
|
11079
|
+
* const functions = await org.getFunction('<app_definition_id>', '<function_id>')
|
|
11080
|
+
*/
|
|
11081
|
+
getFunction: function getFunction(appDefinitionId, functionId) {
|
|
11082
|
+
var raw = this.toPlainObject();
|
|
11083
|
+
return makeRequest({
|
|
11084
|
+
entityType: 'Function',
|
|
11085
|
+
action: 'get',
|
|
11086
|
+
params: {
|
|
11087
|
+
organizationId: raw.sys.id,
|
|
11088
|
+
appDefinitionId: appDefinitionId,
|
|
11089
|
+
functionId: functionId
|
|
11090
|
+
}
|
|
11091
|
+
}).then(function (payload) {
|
|
11092
|
+
return wrapFunction(makeRequest, payload);
|
|
11093
|
+
});
|
|
11094
|
+
},
|
|
11095
|
+
/**
|
|
11096
|
+
* Gets a collection of app functions.
|
|
11097
|
+
* @param appDefinitionId
|
|
11098
|
+
* @param {import('../common-types').AcceptsQueryOptions} query - optional query parameter for filtering functions by action
|
|
11099
|
+
* @returns Promise for a Function
|
|
11100
|
+
* @example ```javascript
|
|
11101
|
+
* const contentful = require('contentful-management')
|
|
11102
|
+
* const client = contentful.createClient({
|
|
11103
|
+
* accessToken: '<content_management_api_key>'
|
|
11104
|
+
* })
|
|
11105
|
+
* const org = await client.getOrganization('<org_id>')
|
|
11106
|
+
* const functions = await org.getFunctions('<app_definition_id>', { 'accepts[all]': '<action>' })
|
|
11107
|
+
*/
|
|
11108
|
+
getFunctions: function getFunctions(appDefinitionId, query) {
|
|
11109
|
+
var raw = this.toPlainObject();
|
|
11110
|
+
return makeRequest({
|
|
11111
|
+
entityType: 'Function',
|
|
11112
|
+
action: 'getMany',
|
|
11113
|
+
params: {
|
|
11114
|
+
organizationId: raw.sys.id,
|
|
11115
|
+
appDefinitionId: appDefinitionId,
|
|
11116
|
+
query: query
|
|
11117
|
+
}
|
|
11118
|
+
}).then(function (payload) {
|
|
11119
|
+
return wrapFunctionCollection(makeRequest, payload);
|
|
11120
|
+
});
|
|
11018
11121
|
}
|
|
11019
11122
|
};
|
|
11020
11123
|
}
|
|
@@ -14727,6 +14830,45 @@ var wrapExtensionCollection = (0,_common_utils__WEBPACK_IMPORTED_MODULE_3__.wrap
|
|
|
14727
14830
|
|
|
14728
14831
|
/***/ }),
|
|
14729
14832
|
|
|
14833
|
+
/***/ "./entities/function-log.ts":
|
|
14834
|
+
/*!**********************************!*\
|
|
14835
|
+
!*** ./entities/function-log.ts ***!
|
|
14836
|
+
\**********************************/
|
|
14837
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
14838
|
+
|
|
14839
|
+
"use strict";
|
|
14840
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14841
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14842
|
+
/* harmony export */ wrapFunctionLog: function() { return /* binding */ wrapFunctionLog; },
|
|
14843
|
+
/* harmony export */ wrapFunctionLogCollection: function() { return /* binding */ wrapFunctionLogCollection; }
|
|
14844
|
+
/* harmony export */ });
|
|
14845
|
+
/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.js");
|
|
14846
|
+
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
|
|
14847
|
+
/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
|
|
14848
|
+
|
|
14849
|
+
|
|
14850
|
+
|
|
14851
|
+
/**
|
|
14852
|
+
* @private
|
|
14853
|
+
* @param makeRequest - function to make requests via an adapter
|
|
14854
|
+
* @param data - raw contentful-Function data
|
|
14855
|
+
* @return Wrapped Function data
|
|
14856
|
+
*/
|
|
14857
|
+
function wrapFunctionLog(makeRequest, data) {
|
|
14858
|
+
var functionLog = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.toPlainObject)((0,fast_copy__WEBPACK_IMPORTED_MODULE_1__["default"])(data));
|
|
14859
|
+
return (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.freezeSys)(functionLog);
|
|
14860
|
+
}
|
|
14861
|
+
|
|
14862
|
+
/**
|
|
14863
|
+
* @private
|
|
14864
|
+
* @param makeRequest - function to make requests via an adapter
|
|
14865
|
+
* @param data - raw contentful-function data
|
|
14866
|
+
* @return Wrapped App Function collection data
|
|
14867
|
+
*/
|
|
14868
|
+
var wrapFunctionLogCollection = (0,_common_utils__WEBPACK_IMPORTED_MODULE_2__.wrapCollection)(wrapFunctionLog);
|
|
14869
|
+
|
|
14870
|
+
/***/ }),
|
|
14871
|
+
|
|
14730
14872
|
/***/ "./entities/function.ts":
|
|
14731
14873
|
/*!******************************!*\
|
|
14732
14874
|
!*** ./entities/function.ts ***!
|
|
@@ -14743,11 +14885,57 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14743
14885
|
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
|
|
14744
14886
|
/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common-utils */ "./common-utils.ts");
|
|
14745
14887
|
/* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
|
|
14746
|
-
/* harmony import */ var _create_function_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../create-function-api */ "./create-function-api.ts");
|
|
14747
14888
|
|
|
14748
14889
|
|
|
14749
14890
|
|
|
14750
14891
|
|
|
14892
|
+
/**
|
|
14893
|
+
* @private
|
|
14894
|
+
*/
|
|
14895
|
+
function createFunctionApi(makeRequest) {
|
|
14896
|
+
return {
|
|
14897
|
+
getFunction: function getFunction() {
|
|
14898
|
+
var raw = this.toPlainObject();
|
|
14899
|
+
return makeRequest({
|
|
14900
|
+
entityType: 'Function',
|
|
14901
|
+
action: 'get',
|
|
14902
|
+
params: {
|
|
14903
|
+
organizationId: raw.sys.organization.sys.id,
|
|
14904
|
+
appDefinitionId: raw.sys.appDefinition.sys.id,
|
|
14905
|
+
functionId: raw.sys.id
|
|
14906
|
+
}
|
|
14907
|
+
}).then(function (data) {
|
|
14908
|
+
return wrapFunction(makeRequest, data);
|
|
14909
|
+
});
|
|
14910
|
+
},
|
|
14911
|
+
getManyFunctions: function getManyFunctions() {
|
|
14912
|
+
var raw = this.toPlainObject();
|
|
14913
|
+
return makeRequest({
|
|
14914
|
+
entityType: 'Function',
|
|
14915
|
+
action: 'getMany',
|
|
14916
|
+
params: {
|
|
14917
|
+
appDefinitionId: raw.sys.appDefinition.sys.id,
|
|
14918
|
+
organizationId: raw.sys.organization.sys.id
|
|
14919
|
+
}
|
|
14920
|
+
}).then(function (data) {
|
|
14921
|
+
return wrapFunctionCollection(makeRequest, data);
|
|
14922
|
+
});
|
|
14923
|
+
},
|
|
14924
|
+
getManyFunctionsForEnvironment: function getManyFunctionsForEnvironment(spaceId, environmentId, appInstallationId) {
|
|
14925
|
+
return makeRequest({
|
|
14926
|
+
entityType: 'Function',
|
|
14927
|
+
action: 'getManyForEnvironment',
|
|
14928
|
+
params: {
|
|
14929
|
+
spaceId: spaceId,
|
|
14930
|
+
environmentId: environmentId,
|
|
14931
|
+
appInstallationId: appInstallationId
|
|
14932
|
+
}
|
|
14933
|
+
}).then(function (data) {
|
|
14934
|
+
return wrapFunctionCollection(makeRequest, data);
|
|
14935
|
+
});
|
|
14936
|
+
}
|
|
14937
|
+
};
|
|
14938
|
+
}
|
|
14751
14939
|
|
|
14752
14940
|
/**
|
|
14753
14941
|
* @private
|
|
@@ -14756,16 +14944,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14756
14944
|
* @return Wrapped Function data
|
|
14757
14945
|
*/
|
|
14758
14946
|
function wrapFunction(makeRequest, data) {
|
|
14759
|
-
var
|
|
14760
|
-
var
|
|
14761
|
-
return (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.freezeSys)(
|
|
14947
|
+
var func = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.toPlainObject)((0,fast_copy__WEBPACK_IMPORTED_MODULE_1__["default"])(data));
|
|
14948
|
+
var funcWithMethods = (0,_enhance_with_methods__WEBPACK_IMPORTED_MODULE_3__["default"])(func, createFunctionApi(makeRequest));
|
|
14949
|
+
return (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.freezeSys)(funcWithMethods);
|
|
14762
14950
|
}
|
|
14763
|
-
|
|
14764
14951
|
/**
|
|
14765
14952
|
* @private
|
|
14766
|
-
* @param makeRequest - real) function to make requests via an adapter
|
|
14767
|
-
* @param data - raw contentful-function data
|
|
14768
|
-
* @return Wrapped App Function collection data
|
|
14769
14953
|
*/
|
|
14770
14954
|
var wrapFunctionCollection = (0,_common_utils__WEBPACK_IMPORTED_MODULE_2__.wrapCollection)(wrapFunction);
|
|
14771
14955
|
|
|
@@ -14805,38 +14989,40 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14805
14989
|
/* harmony import */ var _environment_template_installation__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./environment-template-installation */ "./entities/environment-template-installation.ts");
|
|
14806
14990
|
/* harmony import */ var _extension__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./extension */ "./entities/extension.ts");
|
|
14807
14991
|
/* harmony import */ var _function__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./function */ "./entities/function.ts");
|
|
14808
|
-
/* harmony import */ var
|
|
14809
|
-
/* harmony import */ var
|
|
14810
|
-
/* harmony import */ var
|
|
14811
|
-
/* harmony import */ var
|
|
14812
|
-
/* harmony import */ var
|
|
14813
|
-
/* harmony import */ var
|
|
14814
|
-
/* harmony import */ var
|
|
14815
|
-
/* harmony import */ var
|
|
14816
|
-
/* harmony import */ var
|
|
14817
|
-
/* harmony import */ var
|
|
14818
|
-
/* harmony import */ var
|
|
14819
|
-
/* harmony import */ var
|
|
14820
|
-
/* harmony import */ var
|
|
14821
|
-
/* harmony import */ var
|
|
14822
|
-
/* harmony import */ var
|
|
14823
|
-
/* harmony import */ var
|
|
14824
|
-
/* harmony import */ var
|
|
14825
|
-
/* harmony import */ var
|
|
14826
|
-
/* harmony import */ var
|
|
14827
|
-
/* harmony import */ var
|
|
14828
|
-
/* harmony import */ var
|
|
14829
|
-
/* harmony import */ var
|
|
14830
|
-
/* harmony import */ var
|
|
14831
|
-
/* harmony import */ var
|
|
14832
|
-
/* harmony import */ var
|
|
14833
|
-
/* harmony import */ var
|
|
14834
|
-
/* harmony import */ var
|
|
14835
|
-
/* harmony import */ var
|
|
14836
|
-
/* harmony import */ var
|
|
14837
|
-
/* harmony import */ var
|
|
14838
|
-
/* harmony import */ var
|
|
14839
|
-
/* harmony import */ var
|
|
14992
|
+
/* harmony import */ var _function_log__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./function-log */ "./entities/function-log.ts");
|
|
14993
|
+
/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./locale */ "./entities/locale.ts");
|
|
14994
|
+
/* harmony import */ var _organization__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./organization */ "./entities/organization.ts");
|
|
14995
|
+
/* harmony import */ var _organization_invitation__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./organization-invitation */ "./entities/organization-invitation.ts");
|
|
14996
|
+
/* harmony import */ var _organization_membership__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./organization-membership */ "./entities/organization-membership.ts");
|
|
14997
|
+
/* harmony import */ var _personal_access_token__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./personal-access-token */ "./entities/personal-access-token.ts");
|
|
14998
|
+
/* harmony import */ var _access_token__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./access-token */ "./entities/access-token.ts");
|
|
14999
|
+
/* harmony import */ var _preview_api_key__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./preview-api-key */ "./entities/preview-api-key.ts");
|
|
15000
|
+
/* harmony import */ var _release__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./release */ "./entities/release.ts");
|
|
15001
|
+
/* harmony import */ var _release_action__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./release-action */ "./entities/release-action.ts");
|
|
15002
|
+
/* harmony import */ var _role__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./role */ "./entities/role.ts");
|
|
15003
|
+
/* harmony import */ var _scheduled_action__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./scheduled-action */ "./entities/scheduled-action.ts");
|
|
15004
|
+
/* harmony import */ var _snapshot__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./snapshot */ "./entities/snapshot.ts");
|
|
15005
|
+
/* harmony import */ var _space__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./space */ "./entities/space.ts");
|
|
15006
|
+
/* harmony import */ var _space_member__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./space-member */ "./entities/space-member.ts");
|
|
15007
|
+
/* harmony import */ var _space_membership__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./space-membership */ "./entities/space-membership.ts");
|
|
15008
|
+
/* harmony import */ var _tag__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./tag */ "./entities/tag.ts");
|
|
15009
|
+
/* harmony import */ var _task__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./task */ "./entities/task.ts");
|
|
15010
|
+
/* harmony import */ var _team__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./team */ "./entities/team.ts");
|
|
15011
|
+
/* harmony import */ var _team_membership__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./team-membership */ "./entities/team-membership.ts");
|
|
15012
|
+
/* harmony import */ var _team_space_membership__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./team-space-membership */ "./entities/team-space-membership.ts");
|
|
15013
|
+
/* harmony import */ var _ui_config__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./ui-config */ "./entities/ui-config.ts");
|
|
15014
|
+
/* harmony import */ var _upload__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./upload */ "./entities/upload.ts");
|
|
15015
|
+
/* harmony import */ var _usage__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./usage */ "./entities/usage.ts");
|
|
15016
|
+
/* harmony import */ var _user__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./user */ "./entities/user.ts");
|
|
15017
|
+
/* harmony import */ var _user_ui_config__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./user-ui-config */ "./entities/user-ui-config.ts");
|
|
15018
|
+
/* harmony import */ var _webhook__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./webhook */ "./entities/webhook.ts");
|
|
15019
|
+
/* harmony import */ var _workflow_definition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./workflow-definition */ "./entities/workflow-definition.ts");
|
|
15020
|
+
/* harmony import */ var _concept__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./concept */ "./entities/concept.ts");
|
|
15021
|
+
/* harmony import */ var _concept_scheme__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./concept-scheme */ "./entities/concept-scheme.ts");
|
|
15022
|
+
/* harmony import */ var _resource_provider__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./resource-provider */ "./entities/resource-provider.ts");
|
|
15023
|
+
/* harmony import */ var _resource_type__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./resource-type */ "./entities/resource-type.ts");
|
|
15024
|
+
/* harmony import */ var _resource__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./resource */ "./entities/resource.ts");
|
|
15025
|
+
|
|
14840
15026
|
|
|
14841
15027
|
|
|
14842
15028
|
|
|
@@ -14896,7 +15082,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14896
15082
|
|
|
14897
15083
|
|
|
14898
15084
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
14899
|
-
accessToken:
|
|
15085
|
+
accessToken: _access_token__WEBPACK_IMPORTED_MODULE_32__,
|
|
14900
15086
|
appAction: _app_action__WEBPACK_IMPORTED_MODULE_1__,
|
|
14901
15087
|
appActionCall: _app_action_call__WEBPACK_IMPORTED_MODULE_2__,
|
|
14902
15088
|
appBundle: _app_bundle__WEBPACK_IMPORTED_MODULE_3__,
|
|
@@ -14914,8 +15100,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14914
15100
|
assetKey: _asset_key__WEBPACK_IMPORTED_MODULE_14__,
|
|
14915
15101
|
bulkAction: _bulk_action__WEBPACK_IMPORTED_MODULE_15__,
|
|
14916
15102
|
comment: _comment__WEBPACK_IMPORTED_MODULE_16__,
|
|
14917
|
-
concept:
|
|
14918
|
-
conceptScheme:
|
|
15103
|
+
concept: _concept__WEBPACK_IMPORTED_MODULE_54__,
|
|
15104
|
+
conceptScheme: _concept_scheme__WEBPACK_IMPORTED_MODULE_55__,
|
|
14919
15105
|
contentType: _content_type__WEBPACK_IMPORTED_MODULE_17__,
|
|
14920
15106
|
editorInterface: _editor_interface__WEBPACK_IMPORTED_MODULE_18__,
|
|
14921
15107
|
entry: _entry__WEBPACK_IMPORTED_MODULE_19__,
|
|
@@ -14925,35 +15111,36 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14925
15111
|
environmentTemplateInstallation: _environment_template_installation__WEBPACK_IMPORTED_MODULE_23__,
|
|
14926
15112
|
extension: _extension__WEBPACK_IMPORTED_MODULE_24__,
|
|
14927
15113
|
func: _function__WEBPACK_IMPORTED_MODULE_25__,
|
|
14928
|
-
|
|
14929
|
-
|
|
14930
|
-
|
|
14931
|
-
|
|
14932
|
-
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
14943
|
-
|
|
14944
|
-
|
|
14945
|
-
|
|
14946
|
-
|
|
14947
|
-
|
|
14948
|
-
|
|
14949
|
-
|
|
14950
|
-
|
|
14951
|
-
|
|
14952
|
-
|
|
14953
|
-
|
|
14954
|
-
|
|
14955
|
-
|
|
14956
|
-
|
|
15114
|
+
functionLog: _function_log__WEBPACK_IMPORTED_MODULE_26__,
|
|
15115
|
+
locale: _locale__WEBPACK_IMPORTED_MODULE_27__,
|
|
15116
|
+
organization: _organization__WEBPACK_IMPORTED_MODULE_28__,
|
|
15117
|
+
organizationInvitation: _organization_invitation__WEBPACK_IMPORTED_MODULE_29__,
|
|
15118
|
+
organizationMembership: _organization_membership__WEBPACK_IMPORTED_MODULE_30__,
|
|
15119
|
+
personalAccessToken: _personal_access_token__WEBPACK_IMPORTED_MODULE_31__,
|
|
15120
|
+
previewApiKey: _preview_api_key__WEBPACK_IMPORTED_MODULE_33__,
|
|
15121
|
+
release: _release__WEBPACK_IMPORTED_MODULE_34__,
|
|
15122
|
+
releaseAction: _release_action__WEBPACK_IMPORTED_MODULE_35__,
|
|
15123
|
+
resourceProvider: _resource_provider__WEBPACK_IMPORTED_MODULE_56__,
|
|
15124
|
+
resourceType: _resource_type__WEBPACK_IMPORTED_MODULE_57__,
|
|
15125
|
+
resource: _resource__WEBPACK_IMPORTED_MODULE_58__,
|
|
15126
|
+
role: _role__WEBPACK_IMPORTED_MODULE_36__,
|
|
15127
|
+
scheduledAction: _scheduled_action__WEBPACK_IMPORTED_MODULE_37__,
|
|
15128
|
+
snapshot: _snapshot__WEBPACK_IMPORTED_MODULE_38__,
|
|
15129
|
+
space: _space__WEBPACK_IMPORTED_MODULE_39__,
|
|
15130
|
+
spaceMember: _space_member__WEBPACK_IMPORTED_MODULE_40__,
|
|
15131
|
+
spaceMembership: _space_membership__WEBPACK_IMPORTED_MODULE_41__,
|
|
15132
|
+
tag: _tag__WEBPACK_IMPORTED_MODULE_42__,
|
|
15133
|
+
task: _task__WEBPACK_IMPORTED_MODULE_43__,
|
|
15134
|
+
team: _team__WEBPACK_IMPORTED_MODULE_44__,
|
|
15135
|
+
teamMembership: _team_membership__WEBPACK_IMPORTED_MODULE_45__,
|
|
15136
|
+
teamSpaceMembership: _team_space_membership__WEBPACK_IMPORTED_MODULE_46__,
|
|
15137
|
+
uiConfig: _ui_config__WEBPACK_IMPORTED_MODULE_47__,
|
|
15138
|
+
upload: _upload__WEBPACK_IMPORTED_MODULE_48__,
|
|
15139
|
+
usage: _usage__WEBPACK_IMPORTED_MODULE_49__,
|
|
15140
|
+
user: _user__WEBPACK_IMPORTED_MODULE_50__,
|
|
15141
|
+
userUIConfig: _user_ui_config__WEBPACK_IMPORTED_MODULE_51__,
|
|
15142
|
+
webhook: _webhook__WEBPACK_IMPORTED_MODULE_52__,
|
|
15143
|
+
workflowDefinition: _workflow_definition__WEBPACK_IMPORTED_MODULE_53__
|
|
14957
15144
|
});
|
|
14958
15145
|
|
|
14959
15146
|
/***/ }),
|
|
@@ -17925,6 +18112,10 @@ var createPlainClient = function createPlainClient(makeRequest, defaults) {
|
|
|
17925
18112
|
getMany: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Function', 'getMany'),
|
|
17926
18113
|
getManyForEnvironment: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Function', 'getManyForEnvironment')
|
|
17927
18114
|
},
|
|
18115
|
+
functionLog: {
|
|
18116
|
+
get: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'FunctionLog', 'get'),
|
|
18117
|
+
getMany: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'FunctionLog', 'getMany')
|
|
18118
|
+
},
|
|
17928
18119
|
editorInterface: {
|
|
17929
18120
|
get: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'EditorInterface', 'get'),
|
|
17930
18121
|
getMany: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'EditorInterface', 'getMany'),
|
|
@@ -28039,7 +28230,7 @@ function createClient(params) {
|
|
|
28039
28230
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
28040
28231
|
var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
28041
28232
|
var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
|
|
28042
|
-
"".concat(sdkMain, "/").concat("11.
|
|
28233
|
+
"".concat(sdkMain, "/").concat("11.45.0-beta.1"), params.application, params.integration, params.feature);
|
|
28043
28234
|
var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
|
|
28044
28235
|
userAgent: userAgent
|
|
28045
28236
|
}));
|