Skip to content

Commit 3ca4c6d

Browse files
authored
Merge pull request #88 from contentstack/feature/plugin-support
Plugin Support | Users can use custom plugins with Delivery SDK
2 parents e634ee1 + b7ef107 commit 3ca4c6d

File tree

9 files changed

+14278
-251
lines changed

9 files changed

+14278
-251
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
## Change log
22

3+
### Version: 3.16.0
4+
#### Date: February-10-2023
5+
##### New Features:
6+
- Plugin Support Added
7+
38
### Version: 3.15.3
49
#### Date: July-26-2022
510
##### New Features:
611
- Live preview with reference in entry on SSR web app issue resolved
12+
713
### Version: 3.15.2
814
#### Date: May-03-2022
915
##### New Features:

LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22

33

4-
Copyright (c) 2016-2022 Contentstack
4+
Copyright (c) 2016-2023 Contentstack
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

index.d.ts

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for contentstack 3.12.2
1+
// Type definitions for contentstack v3.12.2 and above
22
// Project: https://www.contentstack.com/
33
// Definitions by: Contentstack <https://github.com/contentstack>
44
import { EntryEmbedable, Option, RenderOption } from '@contentstack/utils'
@@ -52,6 +52,7 @@ export interface Config {
5252
region?: Region;
5353
branch?: string;
5454
live_preview?: LivePreview;
55+
plugins?: ContentstackPlugin[];
5556
fetchOptions?: FetchOptions;
5657
}
5758
// Stack Config
@@ -63,7 +64,7 @@ export interface StackConfig {
6364
}
6465

6566
// ContentTypeCollection
66-
export interface ContentTypeCollection{
67+
export interface ContentTypeCollection {
6768
content_types: Array<any>
6869
count?: number
6970
}
@@ -94,6 +95,17 @@ export interface FetchOptions {
9495
retryDelayOptions?: RetryDelayOption
9596
}
9697

98+
//Plugins
99+
export interface ContentstackPlugin {
100+
onRequest?(stack: Stack, request: ContentstackRequest): ContentstackRequest;
101+
onResponse?(stack: Stack, request: ContentstackRequest, response: any, data: any): any;
102+
}
103+
104+
export interface ContentstackRequest {
105+
url: string;
106+
option: object;
107+
}
108+
97109
// Stack
98110
export class Stack {
99111
constructor(config: Config);

0 commit comments

Comments
 (0)