contentful-management 11.40.4 → 11.41.0

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.
@@ -46,7 +46,7 @@ function createClient(params, opts = {}) {
46
46
  const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
47
47
  const userAgent = getUserAgentHeader(
48
48
  // @ts-expect-error
49
- `${sdkMain}/${"11.40.4"}`, params.application, params.integration, params.feature);
49
+ `${sdkMain}/${"11.41.0"}`, params.application, params.integration, params.feature);
50
50
  const adapter = createAdapter(_objectSpread(_objectSpread({}, params), {}, {
51
51
  userAgent
52
52
  }));
@@ -15,6 +15,10 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
15
15
  * @private
16
16
  */
17
17
 
18
+ /**
19
+ * @private
20
+ */
21
+
18
22
  /**
19
23
  * @private
20
24
  */
@@ -6,4 +6,10 @@ describe('OptionalDefaults', () => {
6
6
  it('adds default props if available', () => {
7
7
  expectTypeOf().toMatchTypeOf();
8
8
  });
9
+ it('handles intersection types', () => {
10
+ expectTypeOf().toMatchTypeOf();
11
+ });
12
+ it('handles union with intersection types', () => {
13
+ expectTypeOf().toMatchTypeOf();
14
+ });
9
15
  });
@@ -2,9 +2,11 @@ import type { BasicCursorPaginationOptions, CursorPaginatedCollectionProp, MakeR
2
2
  export type ResourceQueryOptions = LookupQueryOptions | SearchQueryOptions;
3
3
  type LookupQueryOptions = {
4
4
  'sys.urn[in]': string;
5
+ locale?: string;
5
6
  } & BasicCursorPaginationOptions;
6
7
  type SearchQueryOptions = {
7
8
  query: string;
9
+ locale?: string;
8
10
  } & BasicCursorPaginationOptions;
9
11
  export type ResourceProps = {
10
12
  sys: {
@@ -7,7 +7,11 @@ export type DefaultParams = {
7
7
  /**
8
8
  * @private
9
9
  */
10
- export type OptionalDefaults<T> = Omit<T, keyof DefaultParams> & Partial<Pick<T, Extract<keyof T, keyof DefaultParams>>>;
10
+ type UnionOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
11
+ /**
12
+ * @private
13
+ */
14
+ export type OptionalDefaults<T> = UnionOmit<T, keyof DefaultParams> & Partial<Pick<T, Extract<keyof T, keyof DefaultParams>>>;
11
15
  /**
12
16
  * @private
13
17
  */
@@ -23,3 +27,4 @@ export type WrapFn<ET extends keyof MRActions, Action extends keyof MRActions[ET
23
27
  * @private
24
28
  */
25
29
  export declare const wrap: <ET extends keyof MRActions, Action extends keyof MRActions[ET]>({ makeRequest, defaults }: WrapParams, entityType: ET, action: Action) => WrapFn<ET, Action>;
30
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentful-management",
3
- "version": "11.40.4",
3
+ "version": "11.41.0",
4
4
  "description": "Client for Contentful's Content Management API",
5
5
  "homepage": "https://www.contentful.com/developers/documentation/content-management-api/",
6
6
  "main": "./dist/contentful-management.node.js",