Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@contentful/node-apps-toolkit

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/node-apps-toolkit - npm Package Compare versions

Comparing version 3.4.0 to 3.4.1

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [3.4.1](https://github.com/contentful/node-apps-toolkit/compare/v3.4.0...v3.4.1) (2024-05-06)
### Bug Fixes
* app event function interfaces [EXT-5171] ([#608](https://github.com/contentful/node-apps-toolkit/issues/608)) ([ea8cc4c](https://github.com/contentful/node-apps-toolkit/commit/ea8cc4c2d31c4949cff840b2bb0076852b7c33a4))
# [3.4.0](https://github.com/contentful/node-apps-toolkit/compare/v3.3.0...v3.4.0) (2024-04-09)

@@ -2,0 +9,0 @@

59

lib/requests/typings/function.d.ts

@@ -55,40 +55,20 @@ import { AppInstallationProps, AssetProps, BulkActionProps, CommentProps, ContentTypeProps, EntryProps, EnvironmentTemplateInstallationProps, ReleaseActionProps, ReleaseProps, ScheduledActionProps, TaskProps } from 'contentful-management';

type TemplateInstallationActions = 'complete';
type AppEventBase<EntityProps, EntityActions> = {
entityProps: EntityProps;
entityAction: EntityActions;
type AppEventBase<EntityName extends string, EntityActions extends string, EntityProps> = {
headers: Record<string, string | number> & {
'X-Contentful-Topic': `ContentManagement.${EntityName}.${EntityActions}`;
};
body: EntityProps;
type: typeof APP_EVENT_HANDLER | typeof APP_EVENT_TRANSFORMATION | typeof APP_EVENT_FILTER;
};
export type AppEventContentType = {
entityType: 'ContentType';
} & AppEventBase<ContentTypeProps, ContentTypeActions>;
export type AppEventEntry = {
entityType: 'Entry';
} & AppEventBase<EntryProps, EntryActions>;
export type AppEventAsset = {
entityType: 'Asset';
} & AppEventBase<AssetProps, AssetActions>;
export type AppEventAppInstallation = {
entityType: 'AppInstallation';
} & AppEventBase<AppInstallationProps, AppInstallationActions>;
export type AppEventTask = {
entityType: 'Task';
} & AppEventBase<TaskProps, TaskActions>;
export type AppEventComment = {
entityType: 'Comment';
} & AppEventBase<CommentProps, CommentActions>;
export type AppEventRelease = {
entityType: 'Release';
} & AppEventBase<ReleaseProps, ReleaseActions>;
export type AppEventReleaseAction = {
entityType: 'ReleaseAction';
} & AppEventBase<ReleaseActionProps, ReleaseActionActions>;
export type AppEventScheduledAction = {
entityType: 'ScheduledAction';
} & AppEventBase<ScheduledActionProps, ScheduledActionActions>;
export type AppEventBulkAction = {
entityType: 'BulkAction';
} & AppEventBase<BulkActionProps, BulkActionActions>;
export type AppEventTemplateInstallation = {
entityType: 'TemplateInstallation';
} & AppEventBase<EnvironmentTemplateInstallationProps, TemplateInstallationActions>;
export type AppEventContentType = AppEventBase<'ContentType', ContentTypeActions, ContentTypeProps>;
export type AppEventEntry = AppEventBase<'Entry', EntryActions, EntryProps>;
export type AppEventAsset = AppEventBase<'Asset', AssetActions, AssetProps>;
export type AppEventAppInstallation = AppEventBase<'AppInstallation', AppInstallationActions, AppInstallationProps>;
export type AppEventTask = AppEventBase<'Task', TaskActions, TaskProps>;
export type AppEventComment = AppEventBase<'Comment', CommentActions, CommentProps>;
export type AppEventRelease = AppEventBase<'Release', ReleaseActions, ReleaseProps>;
export type AppEventReleaseAction = AppEventBase<'ReleaseAction', ReleaseActionActions, ReleaseActionProps>;
export type AppEventScheduledAction = AppEventBase<'ScheduledAction', ScheduledActionActions, ScheduledActionProps>;
export type AppEventBulkAction = AppEventBase<'BulkAction', BulkActionActions, BulkActionProps>;
export type AppEventTemplateInstallation = AppEventBase<'TemplateInstallation', TemplateInstallationActions, EnvironmentTemplateInstallationProps>;
export type AppEventRequest = AppEventEntry | AppEventAsset | AppEventContentType | AppEventAppInstallation | AppEventTask | AppEventComment | AppEventRelease | AppEventReleaseAction | AppEventScheduledAction | AppEventBulkAction | AppEventTemplateInstallation;

@@ -98,4 +78,7 @@ export type AppEventFilterResponse = {

};
export type AppEventHandlerResponse = any;
export type AppEventTransformationResponse = any;
export type AppEventTransformationResponse = {
headers: Record<string, string | number>;
body: Record<string, unknown>;
};
export type AppEventHandlerResponse = void;
/**

@@ -102,0 +85,0 @@ * P: Possibility to type app installation parameters

{
"name": "@contentful/node-apps-toolkit",
"version": "3.4.0",
"version": "3.4.1",
"description": "A collection of helpers and utilities for creating NodeJS Contentful Apps",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -32,5 +32,5 @@ # Node Toolkit for Contentful Apps

const { getManagementToken } = require('@contentful/node-apps-toolkit');
const { appInstallationId, spaceId, privateKey } = require('./some-constants');
const { appInstallationId, spaceId, environmentId, privateKey } = require('./some-constants');
getManagementToken(privateKey, {appInstallationId, spaceId})
getManagementToken(privateKey, { appInstallationId, spaceId, environmentId })
.then((token) => {

@@ -37,0 +37,0 @@ console.log('Here is your app token:', token)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc