@kanda-libs/ks-component-ts 0.2.301 → 0.2.303

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanda-libs/ks-component-ts",
3
- "version": "0.2.301",
3
+ "version": "0.2.303",
4
4
  "description": "Kanda form component library",
5
5
  "main": "dist/index.esm.js",
6
6
  "module": "dist/index.esm.js",
@@ -8,6 +8,7 @@ export const Referral = t.intersection([
8
8
  }),
9
9
  t.partial({
10
10
  mobile: t.string,
11
+ from: t.string,
11
12
  cid: t.string,
12
13
  trading_name: t.string,
13
14
  lifecycle: t.string,
@@ -20,6 +21,7 @@ export interface Referral {
20
21
  email: string;
21
22
  name: string;
22
23
  mobile?: string;
24
+ from?: string;
23
25
  cid?: string;
24
26
  trading_name?: string;
25
27
  lifecycle?: string;
@@ -273,6 +273,10 @@ import {
273
273
  postCompanyDirectorVerificationOperation,
274
274
  PostCompanyDirectorVerificationRequestFunction,
275
275
  } from "./postCompanyDirectorVerification";
276
+ import {
277
+ postCompanyReferralsOperation,
278
+ PostCompanyReferralsRequestFunction,
279
+ } from "./postCompanyReferrals";
276
280
  import { postCreditOperation, PostCreditRequestFunction } from "./postCredit";
277
281
  import {
278
282
  postDocumentOperation,
@@ -450,6 +454,7 @@ export const operations: Operations = {
450
454
  getCompanyDirectorVerification: getCompanyDirectorVerificationOperation,
451
455
  postCompanyDirectorVerification: postCompanyDirectorVerificationOperation,
452
456
  directorCompany: directorCompanyOperation,
457
+ postCompanyReferrals: postCompanyReferralsOperation,
453
458
  approveCompany: approveCompanyOperation,
454
459
  declineCompany: declineCompanyOperation,
455
460
  getJobs: getJobsOperation,
@@ -591,6 +596,7 @@ export interface OperationRequestFunctionMap {
591
596
  getCompanyDirectorVerification: GetCompanyDirectorVerificationRequestFunction;
592
597
  postCompanyDirectorVerification: PostCompanyDirectorVerificationRequestFunction;
593
598
  directorCompany: DirectorCompanyRequestFunction;
599
+ postCompanyReferrals: PostCompanyReferralsRequestFunction;
594
600
  approveCompany: ApproveCompanyRequestFunction;
595
601
  declineCompany: DeclineCompanyRequestFunction;
596
602
  getJobs: GetJobsRequestFunction;
@@ -830,6 +836,10 @@ export const requestFunctionsBuilder = (
830
836
  operations.directorCompany,
831
837
  requestAdapter
832
838
  ),
839
+ postCompanyReferrals: requestFunctionBuilder(
840
+ operations.postCompanyReferrals,
841
+ requestAdapter
842
+ ),
833
843
  approveCompany: requestFunctionBuilder(
834
844
  operations.approveCompany,
835
845
  requestAdapter
@@ -1201,6 +1211,7 @@ export const companyServiceBuilder = (
1201
1211
  postCompanyDirectorVerification:
1202
1212
  requestFunctions.postCompanyDirectorVerification,
1203
1213
  directorCompany: requestFunctions.directorCompany,
1214
+ postCompanyReferrals: requestFunctions.postCompanyReferrals,
1204
1215
  approveCompany: requestFunctions.approveCompany,
1205
1216
  declineCompany: requestFunctions.declineCompany,
1206
1217
  });
@@ -1345,6 +1356,7 @@ export interface Operations {
1345
1356
  getCompanyDirectorVerification: typeof getCompanyDirectorVerificationOperation;
1346
1357
  postCompanyDirectorVerification: typeof postCompanyDirectorVerificationOperation;
1347
1358
  directorCompany: typeof directorCompanyOperation;
1359
+ postCompanyReferrals: typeof postCompanyReferralsOperation;
1348
1360
  approveCompany: typeof approveCompanyOperation;
1349
1361
  declineCompany: typeof declineCompanyOperation;
1350
1362
  getJobs: typeof getJobsOperation;
@@ -0,0 +1,38 @@
1
+ import type { RequestFunction } from "@openapi-io-ts/runtime";
2
+ import * as schemas from "../components/schemas";
3
+
4
+ export type PostCompanyReferralsRequestParameters = {
5
+ id: string;
6
+ };
7
+
8
+ export const postCompanyReferralsOperation = {
9
+ path: "/api/company/{id}/referrals",
10
+ method: "post",
11
+ responses: {
12
+ "200": { _tag: "JsonResponse", decoder: schemas.Referral },
13
+ default: { _tag: "JsonResponse", decoder: schemas.Error },
14
+ },
15
+ parameters: [
16
+ {
17
+ _tag: "FormParameter",
18
+ explode: false,
19
+ in: "path",
20
+ name: "id",
21
+ },
22
+ ],
23
+ requestDefaultHeaders: {
24
+ "Content-Type": "application/json",
25
+ Accept: "application/json",
26
+ },
27
+ body: {
28
+ _tag: "JsonBody",
29
+ },
30
+ } as const;
31
+
32
+ export type PostCompanyReferralsRequestFunction = RequestFunction<
33
+ {
34
+ params: PostCompanyReferralsRequestParameters;
35
+ body: Array<schemas.Referral>;
36
+ },
37
+ schemas.Referral
38
+ >;