@openpeepshq/client 0.2.1 → 0.4.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.
@@ -1,4 +1,4 @@
1
- import { allpeepNoPayloadEndpoint } from "./helpers.js";
1
+ import { allpeepNoPayloadEndpoint } from './helpers.js';
2
2
  export const search = (rawClient) => ({
3
3
  posts: allpeepNoPayloadEndpoint(rawClient, '/search/posts'),
4
4
  profiles: allpeepNoPayloadEndpoint(rawClient, '/search/profiles'),
@@ -55,6 +55,7 @@ export declare const server: (rawClient: FetchClient) => {
55
55
  contactEmail?: string | undefined;
56
56
  privacyPolicy?: string | undefined;
57
57
  termsAndConditions?: string | undefined;
58
+ bugReportUrl?: string | undefined;
58
59
  };
59
60
  content: {
60
61
  aboutPage?: string | undefined;
@@ -69,6 +70,7 @@ export declare const server: (rawClient: FetchClient) => {
69
70
  defaultTimeZone?: string | undefined;
70
71
  defaultFeedFormat?: "threaded" | "linear" | undefined;
71
72
  indexProfiles?: boolean | undefined;
73
+ additionalForbiddenHandles?: string[] | undefined;
72
74
  };
73
75
  roles: {
74
76
  onRegistration: {
@@ -132,22 +134,30 @@ export declare const server: (rawClient: FetchClient) => {
132
134
  }, undefined, undefined>;
133
135
  config: {
134
136
  capabilities: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
135
- post: Record<string, {
136
- add: string[];
137
- remove: string[];
138
- }>;
139
- profile: Record<string, {
140
- add: string[];
141
- remove: string[];
142
- }>;
143
- report: Record<string, {
144
- add: string[];
145
- remove: string[];
146
- }>;
147
- accessToken: Record<string, {
148
- add: string[];
149
- remove: string[];
150
- }>;
137
+ post: {
138
+ [x: string]: {
139
+ add: string[];
140
+ remove: string[];
141
+ };
142
+ };
143
+ profile: {
144
+ [x: string]: {
145
+ add: string[];
146
+ remove: string[];
147
+ };
148
+ };
149
+ report: {
150
+ [x: string]: {
151
+ add: string[];
152
+ remove: string[];
153
+ };
154
+ };
155
+ accessToken: {
156
+ [x: string]: {
157
+ add: string[];
158
+ remove: string[];
159
+ };
160
+ };
151
161
  }, {
152
162
  success: boolean;
153
163
  message?: string | undefined;
@@ -1,4 +1,4 @@
1
- import { allpeepNoPayloadEndpoint, allpeepPayloadEndpoint, } from './helpers.js';
1
+ import { allpeepNoPayloadEndpoint, allpeepPayloadEndpoint } from './helpers.js';
2
2
  export const streaming = (rawClient) => ({
3
3
  vod: {
4
4
  /**
@@ -1,4 +1,4 @@
1
1
  import { type WebhookData, type WebhookKeyResponse } from '@openpeepshq/common/types';
2
2
  import type { OpenpeepsNoPayloadEndpoint } from '../types';
3
- export type WebhookHandler = ((input: string) => Promise<WebhookData>);
3
+ export type WebhookHandler = (input: string) => Promise<WebhookData>;
4
4
  export declare const webhookHandler: (publicKeyEndpoint: OpenpeepsNoPayloadEndpoint<WebhookKeyResponse>) => WebhookHandler;
@@ -1,7 +1,7 @@
1
1
  import { webhookDataSchema, } from '@openpeepshq/common/types';
2
2
  import { parseJwtKeyId, verifyJwt } from '@openpeepshq/common/lib';
3
3
  export const webhookHandler = (publicKeyEndpoint) => {
4
- let publicKey = undefined;
4
+ const publicKey = undefined;
5
5
  const getPublicKey = async (kid) => {
6
6
  if (!kid) {
7
7
  throw new Error('Kid is required');
@@ -15,7 +15,7 @@ export const webhookHandler = (publicKeyEndpoint) => {
15
15
  }
16
16
  return result.data.publicKey;
17
17
  };
18
- return (async (input) => {
18
+ return async (input) => {
19
19
  const token = typeof input === 'string' ? input : input.token;
20
20
  const tokenKeyId = parseJwtKeyId(token);
21
21
  const verification = await verifyJwt(token, await getPublicKey(tokenKeyId));
@@ -23,5 +23,5 @@ export const webhookHandler = (publicKeyEndpoint) => {
23
23
  throw new Error('Invalid webhook token');
24
24
  }
25
25
  return webhookDataSchema.parse(verification.payload);
26
- });
26
+ };
27
27
  };
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@openpeepshq/client",
3
- "version": "0.2.1",
3
+ "version": "0.4.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "dependencies": {
8
- "validator": "^13.11.0",
9
8
  "@openpeepshq/fetch-client": "^0.2.1",
10
- "@openpeepshq/common": "^0.3.1"
9
+ "@openpeepshq/common": "^0.8.0"
11
10
  },
12
11
  "main": "./dist/index.js",
13
12
  "types": "./dist/index.d.ts",
@@ -39,20 +38,20 @@
39
38
  ],
40
39
  "devDependencies": {
41
40
  "@types/node": "^22.14.1",
42
- "@types/validator": "^13.11.9",
43
- "@typescript-eslint/eslint-plugin": "^8.19.0",
44
- "@typescript-eslint/parser": "^8.19.0",
45
- "concurrently": "^9.1.2",
46
- "eslint": "^9.17.0",
41
+ "@typescript-eslint/eslint-plugin": "^8.72.0",
42
+ "@typescript-eslint/parser": "^8.72.0",
43
+ "eslint": "^10.14.0",
47
44
  "i18next": "^24.2.3",
48
45
  "livekit-client": "^2.19.2",
49
46
  "prettier": "^3.4.2",
50
47
  "tsc-alias": "^1.8.10",
51
- "typescript": "^5.7.2"
48
+ "typescript": "^6.0.2",
49
+ "eslint-config-prettier": "^9.1.0",
50
+ "@eslint/js": "^9.17.0"
52
51
  },
53
52
  "scripts": {
54
- "lint": "prettier --check . && ESLINT_USE_FLAT_CONFIG=false eslint .",
55
- "format": "prettier --write .",
53
+ "lint": "eslint .",
54
+ "format": "prettier --write --ignore-path ../../.prettierignore .",
56
55
  "clean": "rm -rf tsconfig.tsbuildinfo dist",
57
56
  "typecheck": "tsc --noEmit",
58
57
  "build": "tsc && tsc-alias",
@@ -29,6 +29,7 @@ import {
29
29
  AdminEmailTestInput,
30
30
  AdminJobDetail,
31
31
  AdminPerformanceStats,
32
+ LivekitDiagnosis,
32
33
  ConfigData,
33
34
  ConfigDataWithDefaults,
34
35
  ExplorerRowsResponse,
@@ -43,6 +44,7 @@ import {
43
44
  ProfileWithMeta,
44
45
  PublicAccessToken,
45
46
  Resource,
47
+ StoredMediaList,
46
48
  SuccessResponse,
47
49
  TokenResponse,
48
50
  } from '@openpeepshq/common';
@@ -95,6 +97,10 @@ export type Admin = {
95
97
  create: OpenpeepsNoPayloadEndpoint<SuccessResponse>;
96
98
  restore: OpenpeepsPayloadEndpoint<SuccessResponse, File>;
97
99
  };
100
+ media: {
101
+ list: OpenpeepsNoPayloadEndpoint<StoredMediaList>;
102
+ delete: OpenpeepsNoPayloadEndpoint<SuccessResponse, { storageId: string }>;
103
+ };
98
104
  config: {
99
105
  read: OpenpeepsNoPayloadEndpoint<
100
106
  ConfigDataWithDefaults,
@@ -126,6 +132,7 @@ export type Admin = {
126
132
  >;
127
133
  };
128
134
  performance: OpenpeepsNoPayloadEndpoint<AdminPerformanceStats>;
135
+ livekit: OpenpeepsNoPayloadEndpoint<LivekitDiagnosis>;
129
136
  };
130
137
  db: {
131
138
  token: OpenpeepsNoPayloadEndpoint<TokenResponse>;
@@ -150,6 +157,11 @@ export type Admin = {
150
157
  invites: {
151
158
  create: OpenpeepsPayloadEndpoint<InviteLinkWithMeta, InviteLinkData>;
152
159
  list: OpenpeepsNoPayloadEndpoint<InviteLinkWithMeta[]>;
160
+ update: OpenpeepsPayloadEndpoint<
161
+ InviteLinkWithMeta,
162
+ Partial<Pick<InviteLinkData, 'maxUses' | 'expiresAt'>>,
163
+ { id: string }
164
+ >;
153
165
  activate: OpenpeepsNoPayloadEndpoint<SuccessResponse, { id: string }>;
154
166
  deactivate: OpenpeepsNoPayloadEndpoint<SuccessResponse, { id: string }>;
155
167
  };
@@ -305,6 +317,14 @@ export const admin = (rawClient: FetchClient): Admin => ({
305
317
  'post',
306
318
  ),
307
319
  },
320
+ media: {
321
+ list: allpeepNoPayloadEndpoint<StoredMediaList>(rawClient, '/admin/media'),
322
+ delete: allpeepNoPayloadEndpoint<SuccessResponse, { storageId: string }>(
323
+ rawClient,
324
+ '/admin/media/:storageId',
325
+ 'delete',
326
+ ),
327
+ },
308
328
  config: {
309
329
  read: allpeepNoPayloadEndpoint<
310
330
  ConfigDataWithDefaults,
@@ -346,6 +366,10 @@ export const admin = (rawClient: FetchClient): Admin => ({
346
366
  rawClient,
347
367
  '/admin/diagnostics/performance',
348
368
  ),
369
+ livekit: allpeepNoPayloadEndpoint<LivekitDiagnosis>(
370
+ rawClient,
371
+ '/admin/diagnostics/livekit',
372
+ ),
349
373
  },
350
374
  db: {
351
375
  token: allpeepNoPayloadEndpoint<TokenResponse>(
@@ -410,6 +434,11 @@ export const admin = (rawClient: FetchClient): Admin => ({
410
434
  rawClient,
411
435
  '/invite-links',
412
436
  ),
437
+ update: allpeepPayloadEndpoint<
438
+ InviteLinkWithMeta,
439
+ Partial<Pick<InviteLinkData, 'maxUses' | 'expiresAt'>>,
440
+ { id: string }
441
+ >(rawClient, '/invite-links/:id', 'patch'),
413
442
  activate: allpeepNoPayloadEndpoint<SuccessResponse, { id: string }>(
414
443
  rawClient,
415
444
  '/invite-links/:id/activate',
@@ -1,43 +1,43 @@
1
1
  import type { FetchClient } from '@openpeepshq/fetch-client';
2
2
  import type {
3
- GuestPassRequest,
4
- LoginRequest,
5
- RegisterRequest,
6
- RequestResetPasswordRequest,
7
- ResetPasswordRequest,
8
- SuccessResponse,
9
- TokenResponse,
3
+ GuestPassRequest,
4
+ LoginRequest,
5
+ RegisterRequest,
6
+ RequestResetPasswordRequest,
7
+ ResetPasswordRequest,
8
+ SuccessResponse,
9
+ TokenResponse,
10
10
  } from '@openpeepshq/common';
11
11
  import { allpeepNoPayloadEndpoint, allpeepPayloadEndpoint } from './helpers';
12
12
 
13
13
  export const auth = (rawClient: FetchClient) => ({
14
- login: allpeepPayloadEndpoint<TokenResponse, LoginRequest>(
15
- rawClient,
16
- '/auth/login',
17
- ),
18
- register: allpeepPayloadEndpoint<TokenResponse, RegisterRequest>(
19
- rawClient,
20
- '/auth/register',
21
- ),
22
- requestResetPassword: allpeepPayloadEndpoint<SuccessResponse, RequestResetPasswordRequest>(
23
- rawClient,
24
- '/auth/request-reset-password',
25
- ),
26
- resetPassword: allpeepPayloadEndpoint<SuccessResponse, ResetPasswordRequest>(
27
- rawClient,
28
- '/auth/reset-password',
29
- ),
30
- guestPass: allpeepPayloadEndpoint<TokenResponse, GuestPassRequest>(
31
- rawClient,
32
- '/auth/guest-pass',
33
- ),
34
- refresh: allpeepPayloadEndpoint<TokenResponse, Record<string, never>>(
35
- rawClient,
36
- '/auth/refresh',
37
- ),
38
- validateEmail: allpeepNoPayloadEndpoint<
39
- SuccessResponse,
40
- undefined,
41
- { token: string }
42
- >(rawClient, '/auth/validate-email'),
43
- });
14
+ login: allpeepPayloadEndpoint<TokenResponse, LoginRequest>(
15
+ rawClient,
16
+ '/auth/login',
17
+ ),
18
+ register: allpeepPayloadEndpoint<TokenResponse, RegisterRequest>(
19
+ rawClient,
20
+ '/auth/register',
21
+ ),
22
+ requestResetPassword: allpeepPayloadEndpoint<
23
+ SuccessResponse,
24
+ RequestResetPasswordRequest
25
+ >(rawClient, '/auth/request-reset-password'),
26
+ resetPassword: allpeepPayloadEndpoint<SuccessResponse, ResetPasswordRequest>(
27
+ rawClient,
28
+ '/auth/reset-password',
29
+ ),
30
+ guestPass: allpeepPayloadEndpoint<TokenResponse, GuestPassRequest>(
31
+ rawClient,
32
+ '/auth/guest-pass',
33
+ ),
34
+ refresh: allpeepPayloadEndpoint<TokenResponse, Record<string, never>>(
35
+ rawClient,
36
+ '/auth/refresh',
37
+ ),
38
+ validateEmail: allpeepNoPayloadEndpoint<
39
+ SuccessResponse,
40
+ undefined,
41
+ { token: string }
42
+ >(rawClient, '/auth/validate-email'),
43
+ });
@@ -1,5 +1,6 @@
1
1
  import type { FetchClient } from '@openpeepshq/fetch-client';
2
2
  import type {
3
+ DirectMessageSearchHit,
3
4
  PublicPost,
4
5
  PostCreationData,
5
6
  SuccessResponse,
@@ -12,7 +13,16 @@ import type {
12
13
 
13
14
  type Conversations = {
14
15
  list: OpenpeepsNoPayloadEndpoint<PublicPost[][]>;
15
- findById: OpenpeepsNoPayloadEndpoint<PublicPost[], { id: string }>;
16
+ findById: OpenpeepsNoPayloadEndpoint<
17
+ PublicPost[],
18
+ { id: string },
19
+ { message?: string }
20
+ >;
21
+ search: OpenpeepsNoPayloadEndpoint<
22
+ DirectMessageSearchHit[],
23
+ undefined,
24
+ { q: string; conversationId?: string }
25
+ >;
16
26
  newPost: OpenpeepsPayloadEndpoint<
17
27
  PublicPost,
18
28
  PostCreationData,
@@ -24,10 +34,16 @@ type Conversations = {
24
34
 
25
35
  export const conversations = (rawClient: FetchClient): Conversations => ({
26
36
  list: allpeepNoPayloadEndpoint<PublicPost[][]>(rawClient, '/conversations'),
27
- findById: allpeepNoPayloadEndpoint<PublicPost[], { id: string }>(
28
- rawClient,
29
- '/conversations/:id',
30
- ),
37
+ findById: allpeepNoPayloadEndpoint<
38
+ PublicPost[],
39
+ { id: string },
40
+ { message?: string }
41
+ >(rawClient, '/conversations/:id'),
42
+ search: allpeepNoPayloadEndpoint<
43
+ DirectMessageSearchHit[],
44
+ undefined,
45
+ { q: string; conversationId?: string }
46
+ >(rawClient, '/conversations/search'),
31
47
  newPost: allpeepPayloadEndpoint<PublicPost, PostCreationData, { id: string }>(
32
48
  rawClient,
33
49
  '/conversations/:id/posts',
@@ -1,69 +1,66 @@
1
1
  import type { FetchClient } from '@openpeepshq/fetch-client';
2
2
  import type {
3
- CreateGroupRequest,
4
- GroupData,
5
- GroupMember,
6
- GroupRoleData,
7
- GroupWithMeta,
8
- PublicProfile,
9
- SuccessResponse,
3
+ CreateGroupRequest,
4
+ GroupData,
5
+ GroupMember,
6
+ GroupRoleData,
7
+ GroupWithMeta,
8
+ PublicProfile,
9
+ SuccessResponse,
10
10
  } from '@openpeepshq/common';
11
11
  import { allpeepNoPayloadEndpoint, allpeepPayloadEndpoint } from './helpers';
12
12
 
13
13
  export const groups = (rawClient: FetchClient) => ({
14
- create: allpeepPayloadEndpoint<GroupWithMeta, CreateGroupRequest>(
15
- rawClient,
16
- '/groups',
17
- 'post',
18
- ),
19
- list: allpeepNoPayloadEndpoint<GroupWithMeta[]>(
20
- rawClient,
21
- '/groups',
22
- ),
23
- findById: allpeepNoPayloadEndpoint<GroupWithMeta, { id: string }>(
24
- rawClient,
25
- '/groups/:id',
26
- ),
27
- findByHandle: allpeepNoPayloadEndpoint<GroupWithMeta, { handle: string }>(
28
- rawClient,
29
- '/groups/by-handle/:handle',
30
- ),
31
- update: allpeepPayloadEndpoint<GroupWithMeta, GroupData, { id: string }>(
32
- rawClient,
33
- '/groups/:id',
34
- 'put',
35
- ),
36
- delete: allpeepNoPayloadEndpoint<GroupWithMeta, { id: string }>(
37
- rawClient,
38
- '/groups/:id',
39
- 'delete',
40
- ),
41
- members: allpeepNoPayloadEndpoint<GroupMember[], { id: string }>(
42
- rawClient,
43
- '/groups/:id/members',
44
- ),
45
- join: allpeepNoPayloadEndpoint<SuccessResponse, { id: string }>(
46
- rawClient,
47
- '/groups/:id/join',
48
- 'post',
49
- ),
50
- leave: allpeepNoPayloadEndpoint<SuccessResponse, { id: string }>(
51
- rawClient,
52
- '/groups/:id/leave',
53
- 'delete',
54
- ),
55
- addMember: allpeepPayloadEndpoint<SuccessResponse, PublicProfile, { id: string }>(
56
- rawClient,
57
- '/groups/:id/members',
58
- ),
59
- removeMember: allpeepNoPayloadEndpoint<SuccessResponse, { id: string; memberId: string }>(
60
- rawClient,
61
- '/groups/:id/members/:memberId',
62
- 'delete',
63
- ),
64
- setMemberRoles: allpeepPayloadEndpoint<SuccessResponse, GroupRoleData, { id: string; memberId: string }>(
65
- rawClient,
66
- '/groups/:id/members/:memberId',
67
- 'put',
68
- ),
69
- });
14
+ create: allpeepPayloadEndpoint<GroupWithMeta, CreateGroupRequest>(
15
+ rawClient,
16
+ '/groups',
17
+ 'post',
18
+ ),
19
+ list: allpeepNoPayloadEndpoint<GroupWithMeta[]>(rawClient, '/groups'),
20
+ findById: allpeepNoPayloadEndpoint<GroupWithMeta, { id: string }>(
21
+ rawClient,
22
+ '/groups/:id',
23
+ ),
24
+ findByHandle: allpeepNoPayloadEndpoint<GroupWithMeta, { handle: string }>(
25
+ rawClient,
26
+ '/groups/by-handle/:handle',
27
+ ),
28
+ update: allpeepPayloadEndpoint<GroupWithMeta, GroupData, { id: string }>(
29
+ rawClient,
30
+ '/groups/:id',
31
+ 'put',
32
+ ),
33
+ delete: allpeepNoPayloadEndpoint<GroupWithMeta, { id: string }>(
34
+ rawClient,
35
+ '/groups/:id',
36
+ 'delete',
37
+ ),
38
+ members: allpeepNoPayloadEndpoint<GroupMember[], { id: string }>(
39
+ rawClient,
40
+ '/groups/:id/members',
41
+ ),
42
+ join: allpeepNoPayloadEndpoint<SuccessResponse, { id: string }>(
43
+ rawClient,
44
+ '/groups/:id/join',
45
+ 'post',
46
+ ),
47
+ leave: allpeepNoPayloadEndpoint<SuccessResponse, { id: string }>(
48
+ rawClient,
49
+ '/groups/:id/leave',
50
+ 'delete',
51
+ ),
52
+ addMember: allpeepPayloadEndpoint<
53
+ SuccessResponse,
54
+ PublicProfile,
55
+ { id: string }
56
+ >(rawClient, '/groups/:id/members'),
57
+ removeMember: allpeepNoPayloadEndpoint<
58
+ SuccessResponse,
59
+ { id: string; memberId: string }
60
+ >(rawClient, '/groups/:id/members/:memberId', 'delete'),
61
+ setMemberRoles: allpeepPayloadEndpoint<
62
+ SuccessResponse,
63
+ GroupRoleData,
64
+ { id: string; memberId: string }
65
+ >(rawClient, '/groups/:id/members/:memberId', 'put'),
66
+ });
@@ -1,91 +1,91 @@
1
- import type { SuccessFailureResponse } from "@openpeepshq/common";
1
+ import type { SuccessFailureResponse } from '@openpeepshq/common';
2
2
  import {
3
- type BodyType,
4
- type EndpointDefinition,
5
- type FetchClient,
6
- type FormDataEndpointDefinition,
7
- type FormDataSource,
8
- type ParametersType,
9
- typedNoPayloadEndpoint,
10
- typedPayloadEndpoint,
11
- typedPayloadProgressObserverEndpoint,
12
- type Verb,
13
- } from "@openpeepshq/fetch-client";
3
+ type BodyType,
4
+ type EndpointDefinition,
5
+ type FetchClient,
6
+ type FormDataEndpointDefinition,
7
+ type FormDataSource,
8
+ type ParametersType,
9
+ typedNoPayloadEndpoint,
10
+ typedPayloadEndpoint,
11
+ typedPayloadProgressObserverEndpoint,
12
+ type Verb,
13
+ } from '@openpeepshq/fetch-client';
14
14
 
15
15
  export const allpeepPayloadEndpoint = <
16
- Output,
17
- Input extends BodyType,
18
- PathParameters extends ParametersType = undefined,
19
- QueryParameters extends ParametersType = undefined,
16
+ Output,
17
+ Input extends BodyType,
18
+ PathParameters extends ParametersType = undefined,
19
+ QueryParameters extends ParametersType = undefined,
20
20
  >(
21
- rawClient: FetchClient,
22
- path: string,
23
- method: Verb = "post",
24
- convertToFormData?: Input extends FormDataSource ? true : false | undefined,
21
+ rawClient: FetchClient,
22
+ path: string,
23
+ method: Verb = 'post',
24
+ convertToFormData?: Input extends FormDataSource ? true : false | undefined,
25
25
  ) =>
26
- typedPayloadEndpoint<
27
- Output,
28
- Input,
29
- SuccessFailureResponse,
30
- PathParameters,
31
- QueryParameters
32
- >(
33
- {
34
- path,
35
- method,
36
- convertToFormData,
37
- } as Input extends FormDataSource
38
- ? FormDataEndpointDefinition
39
- : EndpointDefinition,
40
- rawClient,
41
- );
26
+ typedPayloadEndpoint<
27
+ Output,
28
+ Input,
29
+ SuccessFailureResponse,
30
+ PathParameters,
31
+ QueryParameters
32
+ >(
33
+ {
34
+ path,
35
+ method,
36
+ convertToFormData,
37
+ } as Input extends FormDataSource
38
+ ? FormDataEndpointDefinition
39
+ : EndpointDefinition,
40
+ rawClient,
41
+ );
42
42
 
43
43
  export const allpeepPayloadProgressObserverEndpoint = <
44
- Output,
45
- Input extends BodyType,
46
- PathParameters extends ParametersType = undefined,
47
- QueryParameters extends ParametersType = undefined,
44
+ Output,
45
+ Input extends BodyType,
46
+ PathParameters extends ParametersType = undefined,
47
+ QueryParameters extends ParametersType = undefined,
48
48
  >(
49
- rawClient: FetchClient,
50
- path: string,
51
- method: Verb = "post",
52
- convertToFormData?: Input extends FormDataSource ? true : false | undefined,
49
+ rawClient: FetchClient,
50
+ path: string,
51
+ method: Verb = 'post',
52
+ convertToFormData?: Input extends FormDataSource ? true : false | undefined,
53
53
  ) =>
54
- typedPayloadProgressObserverEndpoint<
55
- Output,
56
- Input,
57
- SuccessFailureResponse,
58
- PathParameters,
59
- QueryParameters
60
- >(
61
- {
62
- path,
63
- method,
64
- convertToFormData,
65
- } as Input extends FormDataSource
66
- ? FormDataEndpointDefinition
67
- : EndpointDefinition,
68
- rawClient,
69
- );
54
+ typedPayloadProgressObserverEndpoint<
55
+ Output,
56
+ Input,
57
+ SuccessFailureResponse,
58
+ PathParameters,
59
+ QueryParameters
60
+ >(
61
+ {
62
+ path,
63
+ method,
64
+ convertToFormData,
65
+ } as Input extends FormDataSource
66
+ ? FormDataEndpointDefinition
67
+ : EndpointDefinition,
68
+ rawClient,
69
+ );
70
70
 
71
71
  export const allpeepNoPayloadEndpoint = <
72
- Output,
73
- PathParameters extends ParametersType = undefined,
74
- QueryParameters extends ParametersType = undefined,
72
+ Output,
73
+ PathParameters extends ParametersType = undefined,
74
+ QueryParameters extends ParametersType = undefined,
75
75
  >(
76
- rawClient: FetchClient,
77
- path: string,
78
- method: Verb = "get",
76
+ rawClient: FetchClient,
77
+ path: string,
78
+ method: Verb = 'get',
79
79
  ) =>
80
- typedNoPayloadEndpoint<
81
- Output,
82
- SuccessFailureResponse,
83
- PathParameters,
84
- QueryParameters
85
- >(
86
- {
87
- path,
88
- method,
89
- },
90
- rawClient,
91
- );
80
+ typedNoPayloadEndpoint<
81
+ Output,
82
+ SuccessFailureResponse,
83
+ PathParameters,
84
+ QueryParameters
85
+ >(
86
+ {
87
+ path,
88
+ method,
89
+ },
90
+ rawClient,
91
+ );