@lokalise/connector-api-contracts 1.4.0 → 1.4.2

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.
@@ -6,6 +6,9 @@ export declare const getAuthResponseBody: z.ZodObject<{
6
6
  }>;
7
7
  }, z.core.$strip>;
8
8
  export type GetAuthResponseBody = z.infer<typeof getAuthResponseBody>;
9
+ /**
10
+ * @deprecated Define method type on CTENG side instead
11
+ */
9
12
  export declare const getAuthContract: import("@lokalise/api-contracts").GetRouteDefinition<z.ZodObject<{
10
13
  type: z.ZodEnum<{
11
14
  OAuth: "OAuth";
@@ -26,7 +29,7 @@ export declare const postAuthResponseBody: z.ZodObject<{}, z.core.$loose>;
26
29
  export type PostAuthResponseBody = Record<string, unknown> & {
27
30
  url?: string;
28
31
  };
29
- export declare const postAuthContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodNever, z.ZodObject<{}, z.core.$loose>, undefined, undefined, z.ZodObject<{
32
+ export declare const postAuthContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodOptional<z.ZodNull>, z.ZodObject<{}, z.core.$loose>, undefined, undefined, z.ZodObject<{
30
33
  'ce-config': z.ZodString;
31
34
  'ce-auth': z.ZodString;
32
35
  }, z.core.$strip>, false, false, {
@@ -36,7 +39,7 @@ export declare const postAuthContract: import("@lokalise/api-contracts").Payload
36
39
  statusCode: z.ZodNumber;
37
40
  }, z.core.$strip>;
38
41
  }>;
39
- export declare const postAuthRefreshContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodNever, z.ZodObject<{}, z.core.$loose>, undefined, undefined, z.ZodObject<{
42
+ export declare const postAuthRefreshContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodOptional<z.ZodNull>, z.ZodObject<{}, z.core.$loose>, undefined, undefined, z.ZodObject<{
40
43
  'ce-config': z.ZodString;
41
44
  'ce-auth': z.ZodString;
42
45
  }, z.core.$strip>, false, false, {
@@ -6,6 +6,9 @@ const AUTH_TYPES_AVAILABLE = ['OAuth', 'apiToken'];
6
6
  export const getAuthResponseBody = z.object({
7
7
  type: z.enum(AUTH_TYPES_AVAILABLE),
8
8
  });
9
+ /**
10
+ * @deprecated Define method type on CTENG side instead
11
+ */
9
12
  export const getAuthContract = buildGetRoute({
10
13
  pathResolver: () => `/auth`,
11
14
  description: 'Define auth method type: "OAuth" or "apiToken"',
@@ -19,7 +22,7 @@ export const getAuthContract = buildGetRoute({
19
22
  export const postAuthResponseBody = z.looseObject({});
20
23
  export const postAuthContract = buildPayloadRoute({
21
24
  method: 'post',
22
- requestBodySchema: z.never(),
25
+ requestBodySchema: z.null().optional(),
23
26
  pathResolver: () => `/auth`,
24
27
  description: 'Validate provided auth integration configuration (applicable only for "apiToken" type)',
25
28
  successResponseBodySchema: postAuthResponseBody,
@@ -32,7 +35,7 @@ export const postAuthContract = buildPayloadRoute({
32
35
  // postAuthRefresh
33
36
  export const postAuthRefreshContract = buildPayloadRoute({
34
37
  method: 'post',
35
- requestBodySchema: z.never(),
38
+ requestBodySchema: z.null().optional(),
36
39
  pathResolver: () => `/auth/refresh`,
37
40
  description: 'Refresh auth integration configuration (applicable only for "apiToken" type)',
38
41
  successResponseBodySchema: postAuthResponseBody,
@@ -1 +1 @@
1
- {"version":3,"file":"authContracts.js","sourceRoot":"","sources":["../../src/contracts/authContracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAA;AAE1F,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAU,CAAA;AAE3D,UAAU;AAEV,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,IAAI,CA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4BAA4B,GAAG,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;AAG7D,MAAM,CAAC,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACxD,MAAM,EAAE,MAAM;IACd,iBAAiB,EAAE,2BAA2B;IAC9C,YAAY,EAAE,GAAG,EAAE,CAAC,gBAAgB;IACpC,WAAW,EAAE,2DAA2D;IACxE,yBAAyB,EAAE,4BAA4B;IACvD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,4BAA4B;QACjC,GAAG,EAAE,SAAS;KACf;IACD,mBAAmB,EAAE,gCAAgC;CACtD,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/connector-api-contracts",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Lokalise Connector API schemas and contracts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",