@vulog/aima-promocode 1.2.30 → 1.2.31

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/dist/index.cjs ADDED
@@ -0,0 +1,67 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let zod = require("zod");
3
+ //#region src/checkInvitationCode.ts
4
+ const checkInvitationCode = async (client, referralCode) => {
5
+ const result = zod.z.string().trim().min(1).safeParse(referralCode);
6
+ if (!result.success) throw new TypeError("Invalid referralCode", { cause: result.error.issues });
7
+ return client.get(`boapi/proxy/user/fleets/${client.clientOptions.fleetId}/invitation/check/${referralCode}`).then(({ data }) => data).catch((error) => {
8
+ if (error.formattedError?.status === 404) return;
9
+ throw error;
10
+ });
11
+ };
12
+ //#endregion
13
+ //#region src/getPromoCode.ts
14
+ const getPromoCodeByReference = async (client, reference) => {
15
+ const result = zod.z.string().trim().min(1).safeParse(reference);
16
+ if (!result.success) throw new TypeError("Invalid reference", { cause: result.error.issues });
17
+ return client.get(`boapi/proxy/billing/fleets/${client.clientOptions.fleetId}/promoCodes?reference=${reference}`).then(({ data: [r] }) => r);
18
+ };
19
+ const getPromoCodeById = async (client, id) => {
20
+ const result = zod.z.number().positive().safeParse(id);
21
+ if (!result.success) throw new TypeError("Invalid id", { cause: result.error.issues });
22
+ return client.get(`boapi/proxy/billing/fleets/${client.clientOptions.fleetId}/promoCodes/${id}`).then(({ data }) => data).catch((error) => {
23
+ if (error.formattedError?.status === 404) return;
24
+ throw error;
25
+ });
26
+ };
27
+ //#endregion
28
+ //#region src/submitPromoCode.ts
29
+ const schema$1 = zod.z.object({
30
+ userId: zod.z.string().uuid(),
31
+ entityId: zod.z.string().uuid(),
32
+ code: zod.z.string().min(1)
33
+ });
34
+ const submitPromoCode = async (client, userId, entityId, code) => {
35
+ const result = schema$1.safeParse({
36
+ userId,
37
+ entityId,
38
+ code
39
+ });
40
+ if (!result.success) throw new TypeError("Invalid args", { cause: result.error.issues });
41
+ return client.put(`boapi/proxy/user/billing/fleets/${client.clientOptions.fleetId}/promoCodes/redeem/${code}`, {
42
+ userId,
43
+ entityId
44
+ }).then(({ data }) => data);
45
+ };
46
+ //#endregion
47
+ //#region src/submitReferral.ts
48
+ const schema = zod.z.object({
49
+ userId: zod.z.string().uuid(),
50
+ entityId: zod.z.string().uuid(),
51
+ code: zod.z.string().min(1)
52
+ });
53
+ const submitReferral = async (client, userId, entityId, code) => {
54
+ const result = schema.safeParse({
55
+ userId,
56
+ entityId,
57
+ code
58
+ });
59
+ if (!result.success) throw new TypeError("Invalid args", { cause: result.error.issues });
60
+ await client.post(`boapi/proxy/user/fleets/${client.clientOptions.fleetId}/invitation/users/${userId}/entity/${entityId}/redeem/${code}`);
61
+ };
62
+ //#endregion
63
+ exports.checkInvitationCode = checkInvitationCode;
64
+ exports.getPromoCodeById = getPromoCodeById;
65
+ exports.getPromoCodeByReference = getPromoCodeByReference;
66
+ exports.submitPromoCode = submitPromoCode;
67
+ exports.submitReferral = submitReferral;
@@ -0,0 +1,55 @@
1
+ import { Client } from "@vulog/aima-client";
2
+
3
+ //#region src/types.d.ts
4
+ type ProductGroup = {
5
+ id: string;
6
+ name: string;
7
+ status: 'ACTIVE' | 'INACTIVE';
8
+ };
9
+ type PromoCodeUsage = {
10
+ id: number;
11
+ walletUsage: 'TRIP' | 'PRODUCTS';
12
+ discountCategory: 'CREDITS';
13
+ percentage: number;
14
+ amount: number;
15
+ cappedPercentage: null;
16
+ isOneTimeUsage: boolean;
17
+ productGroup?: ProductGroup | null;
18
+ };
19
+ type PromoCode = {
20
+ reference: string;
21
+ walletType: string;
22
+ status: 'ACTIVE' | 'INACTIVE';
23
+ validityDuration: number;
24
+ effectiveDate: string;
25
+ expiryDate: string;
26
+ validityEndDate: string;
27
+ description?: string;
28
+ id: number;
29
+ fleetId: string;
30
+ registration: boolean;
31
+ maxUses: number;
32
+ usages: PromoCodeUsage[];
33
+ [key: string]: any;
34
+ };
35
+ type ReferralInfo = {
36
+ referralUserId: string;
37
+ referralCode: string;
38
+ referralPromocodeId: number;
39
+ refereePromocodeId: number;
40
+ };
41
+ //#endregion
42
+ //#region src/checkInvitationCode.d.ts
43
+ declare const checkInvitationCode: (client: Client, referralCode: string) => Promise<ReferralInfo | undefined>;
44
+ //#endregion
45
+ //#region src/getPromoCode.d.ts
46
+ declare const getPromoCodeByReference: (client: Client, reference: string) => Promise<PromoCode | undefined>;
47
+ declare const getPromoCodeById: (client: Client, id: number) => Promise<PromoCode | undefined>;
48
+ //#endregion
49
+ //#region src/submitPromoCode.d.ts
50
+ declare const submitPromoCode: (client: Client, userId: string, entityId: string, code: string) => Promise<string>;
51
+ //#endregion
52
+ //#region src/submitReferral.d.ts
53
+ declare const submitReferral: (client: Client, userId: string, entityId: string, code: string) => Promise<void>;
54
+ //#endregion
55
+ export { ProductGroup, PromoCode, PromoCodeUsage, ReferralInfo, checkInvitationCode, getPromoCodeById, getPromoCodeByReference, submitPromoCode, submitReferral };
package/dist/index.d.mts CHANGED
@@ -1,50 +1,55 @@
1
- import { Client } from '@vulog/aima-client';
1
+ import { Client } from "@vulog/aima-client";
2
2
 
3
+ //#region src/types.d.ts
3
4
  type ProductGroup = {
4
- id: string;
5
- name: string;
6
- status: 'ACTIVE' | 'INACTIVE';
5
+ id: string;
6
+ name: string;
7
+ status: 'ACTIVE' | 'INACTIVE';
7
8
  };
8
9
  type PromoCodeUsage = {
9
- id: number;
10
- walletUsage: 'TRIP' | 'PRODUCTS';
11
- discountCategory: 'CREDITS';
12
- percentage: number;
13
- amount: number;
14
- cappedPercentage: null;
15
- isOneTimeUsage: boolean;
16
- productGroup?: ProductGroup | null;
10
+ id: number;
11
+ walletUsage: 'TRIP' | 'PRODUCTS';
12
+ discountCategory: 'CREDITS';
13
+ percentage: number;
14
+ amount: number;
15
+ cappedPercentage: null;
16
+ isOneTimeUsage: boolean;
17
+ productGroup?: ProductGroup | null;
17
18
  };
18
19
  type PromoCode = {
19
- reference: string;
20
- walletType: string;
21
- status: 'ACTIVE' | 'INACTIVE';
22
- validityDuration: number;
23
- effectiveDate: string;
24
- expiryDate: string;
25
- validityEndDate: string;
26
- description?: string;
27
- id: number;
28
- fleetId: string;
29
- registration: boolean;
30
- maxUses: number;
31
- usages: PromoCodeUsage[];
32
- [key: string]: any;
20
+ reference: string;
21
+ walletType: string;
22
+ status: 'ACTIVE' | 'INACTIVE';
23
+ validityDuration: number;
24
+ effectiveDate: string;
25
+ expiryDate: string;
26
+ validityEndDate: string;
27
+ description?: string;
28
+ id: number;
29
+ fleetId: string;
30
+ registration: boolean;
31
+ maxUses: number;
32
+ usages: PromoCodeUsage[];
33
+ [key: string]: any;
33
34
  };
34
35
  type ReferralInfo = {
35
- referralUserId: string;
36
- referralCode: string;
37
- referralPromocodeId: number;
38
- refereePromocodeId: number;
36
+ referralUserId: string;
37
+ referralCode: string;
38
+ referralPromocodeId: number;
39
+ refereePromocodeId: number;
39
40
  };
40
-
41
+ //#endregion
42
+ //#region src/checkInvitationCode.d.ts
41
43
  declare const checkInvitationCode: (client: Client, referralCode: string) => Promise<ReferralInfo | undefined>;
42
-
44
+ //#endregion
45
+ //#region src/getPromoCode.d.ts
43
46
  declare const getPromoCodeByReference: (client: Client, reference: string) => Promise<PromoCode | undefined>;
44
47
  declare const getPromoCodeById: (client: Client, id: number) => Promise<PromoCode | undefined>;
45
-
48
+ //#endregion
49
+ //#region src/submitPromoCode.d.ts
46
50
  declare const submitPromoCode: (client: Client, userId: string, entityId: string, code: string) => Promise<string>;
47
-
51
+ //#endregion
52
+ //#region src/submitReferral.d.ts
48
53
  declare const submitReferral: (client: Client, userId: string, entityId: string, code: string) => Promise<void>;
49
-
50
- export { type ProductGroup, type PromoCode, type PromoCodeUsage, type ReferralInfo, checkInvitationCode, getPromoCodeById, getPromoCodeByReference, submitPromoCode, submitReferral };
54
+ //#endregion
55
+ export { ProductGroup, PromoCode, PromoCodeUsage, ReferralInfo, checkInvitationCode, getPromoCodeById, getPromoCodeByReference, submitPromoCode, submitReferral };
package/dist/index.mjs CHANGED
@@ -1,88 +1,62 @@
1
- // src/checkInvitationCode.ts
2
1
  import { z } from "zod";
3
- var checkInvitationCode = async (client, referralCode) => {
4
- const result = z.string().trim().min(1).safeParse(referralCode);
5
- if (!result.success) {
6
- throw new TypeError("Invalid referralCode", {
7
- cause: result.error.issues
8
- });
9
- }
10
- return client.get(`boapi/proxy/user/fleets/${client.clientOptions.fleetId}/invitation/check/${referralCode}`).then(({ data }) => data).catch((error) => {
11
- if (error.formattedError?.status === 404) {
12
- return void 0;
13
- }
14
- throw error;
15
- });
2
+ //#region src/checkInvitationCode.ts
3
+ const checkInvitationCode = async (client, referralCode) => {
4
+ const result = z.string().trim().min(1).safeParse(referralCode);
5
+ if (!result.success) throw new TypeError("Invalid referralCode", { cause: result.error.issues });
6
+ return client.get(`boapi/proxy/user/fleets/${client.clientOptions.fleetId}/invitation/check/${referralCode}`).then(({ data }) => data).catch((error) => {
7
+ if (error.formattedError?.status === 404) return;
8
+ throw error;
9
+ });
16
10
  };
17
-
18
- // src/getPromoCode.ts
19
- import { z as z2 } from "zod";
20
- var getPromoCodeByReference = async (client, reference) => {
21
- const result = z2.string().trim().min(1).safeParse(reference);
22
- if (!result.success) {
23
- throw new TypeError("Invalid reference", {
24
- cause: result.error.issues
25
- });
26
- }
27
- return client.get(`boapi/proxy/billing/fleets/${client.clientOptions.fleetId}/promoCodes?reference=${reference}`).then(({ data: [r] }) => r);
11
+ //#endregion
12
+ //#region src/getPromoCode.ts
13
+ const getPromoCodeByReference = async (client, reference) => {
14
+ const result = z.string().trim().min(1).safeParse(reference);
15
+ if (!result.success) throw new TypeError("Invalid reference", { cause: result.error.issues });
16
+ return client.get(`boapi/proxy/billing/fleets/${client.clientOptions.fleetId}/promoCodes?reference=${reference}`).then(({ data: [r] }) => r);
28
17
  };
29
- var getPromoCodeById = async (client, id) => {
30
- const result = z2.number().positive().safeParse(id);
31
- if (!result.success) {
32
- throw new TypeError("Invalid id", {
33
- cause: result.error.issues
34
- });
35
- }
36
- return client.get(`boapi/proxy/billing/fleets/${client.clientOptions.fleetId}/promoCodes/${id}`).then(({ data }) => data).catch((error) => {
37
- if (error.formattedError?.status === 404) {
38
- return void 0;
39
- }
40
- throw error;
41
- });
18
+ const getPromoCodeById = async (client, id) => {
19
+ const result = z.number().positive().safeParse(id);
20
+ if (!result.success) throw new TypeError("Invalid id", { cause: result.error.issues });
21
+ return client.get(`boapi/proxy/billing/fleets/${client.clientOptions.fleetId}/promoCodes/${id}`).then(({ data }) => data).catch((error) => {
22
+ if (error.formattedError?.status === 404) return;
23
+ throw error;
24
+ });
42
25
  };
43
-
44
- // src/submitPromoCode.ts
45
- import { z as z3 } from "zod";
46
- var schema = z3.object({
47
- userId: z3.string().uuid(),
48
- entityId: z3.string().uuid(),
49
- code: z3.string().min(1)
26
+ //#endregion
27
+ //#region src/submitPromoCode.ts
28
+ const schema$1 = z.object({
29
+ userId: z.string().uuid(),
30
+ entityId: z.string().uuid(),
31
+ code: z.string().min(1)
50
32
  });
51
- var submitPromoCode = async (client, userId, entityId, code) => {
52
- const result = schema.safeParse({ userId, entityId, code });
53
- if (!result.success) {
54
- throw new TypeError("Invalid args", {
55
- cause: result.error.issues
56
- });
57
- }
58
- return client.put(`boapi/proxy/user/billing/fleets/${client.clientOptions.fleetId}/promoCodes/redeem/${code}`, {
59
- userId,
60
- entityId
61
- }).then(({ data }) => data);
33
+ const submitPromoCode = async (client, userId, entityId, code) => {
34
+ const result = schema$1.safeParse({
35
+ userId,
36
+ entityId,
37
+ code
38
+ });
39
+ if (!result.success) throw new TypeError("Invalid args", { cause: result.error.issues });
40
+ return client.put(`boapi/proxy/user/billing/fleets/${client.clientOptions.fleetId}/promoCodes/redeem/${code}`, {
41
+ userId,
42
+ entityId
43
+ }).then(({ data }) => data);
62
44
  };
63
-
64
- // src/submitReferral.ts
65
- import { z as z4 } from "zod";
66
- var schema2 = z4.object({
67
- userId: z4.string().uuid(),
68
- entityId: z4.string().uuid(),
69
- code: z4.string().min(1)
45
+ //#endregion
46
+ //#region src/submitReferral.ts
47
+ const schema = z.object({
48
+ userId: z.string().uuid(),
49
+ entityId: z.string().uuid(),
50
+ code: z.string().min(1)
70
51
  });
71
- var submitReferral = async (client, userId, entityId, code) => {
72
- const result = schema2.safeParse({ userId, entityId, code });
73
- if (!result.success) {
74
- throw new TypeError("Invalid args", {
75
- cause: result.error.issues
76
- });
77
- }
78
- await client.post(
79
- `boapi/proxy/user/fleets/${client.clientOptions.fleetId}/invitation/users/${userId}/entity/${entityId}/redeem/${code}`
80
- );
81
- };
82
- export {
83
- checkInvitationCode,
84
- getPromoCodeById,
85
- getPromoCodeByReference,
86
- submitPromoCode,
87
- submitReferral
52
+ const submitReferral = async (client, userId, entityId, code) => {
53
+ const result = schema.safeParse({
54
+ userId,
55
+ entityId,
56
+ code
57
+ });
58
+ if (!result.success) throw new TypeError("Invalid args", { cause: result.error.issues });
59
+ await client.post(`boapi/proxy/user/fleets/${client.clientOptions.fleetId}/invitation/users/${userId}/entity/${entityId}/redeem/${code}`);
88
60
  };
61
+ //#endregion
62
+ export { checkInvitationCode, getPromoCodeById, getPromoCodeByReference, submitPromoCode, submitReferral };
package/package.json CHANGED
@@ -1,13 +1,26 @@
1
1
  {
2
2
  "name": "@vulog/aima-promocode",
3
- "version": "1.2.30",
4
- "main": "dist/index.js",
3
+ "type": "module",
4
+ "version": "1.2.31",
5
+ "main": "dist/index.cjs",
5
6
  "module": "dist/index.mjs",
6
- "types": "dist/index.d.ts",
7
+ "types": "dist/index.d.cts",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./dist/index.d.mts",
12
+ "default": "./dist/index.mjs"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.cts",
16
+ "default": "./dist/index.cjs"
17
+ }
18
+ }
19
+ },
7
20
  "scripts": {
8
- "build": "tsup",
9
- "dev": "tsup --watch",
10
- "test": "vitest run",
21
+ "build": "tsdown",
22
+ "dev": "tsdown --watch",
23
+ "test": "vitest run --passWithNoTests",
11
24
  "test:watch": "vitest",
12
25
  "lint": "eslint src/**/* --ext .ts"
13
26
  },
@@ -20,8 +33,8 @@
20
33
  "author": "Vulog",
21
34
  "license": "MIT",
22
35
  "dependencies": {
23
- "@vulog/aima-client": "1.2.30",
24
- "@vulog/aima-core": "1.2.30"
36
+ "@vulog/aima-client": "1.2.31",
37
+ "@vulog/aima-core": "1.2.31"
25
38
  },
26
39
  "peerDependencies": {
27
40
  "zod": "^3.25.76"
@@ -1,4 +1,4 @@
1
- import { defineConfig } from 'tsup';
1
+ import { defineConfig } from 'tsdown';
2
2
 
3
3
  export default defineConfig({
4
4
  entry: ['src/index.ts'],
package/dist/index.d.ts DELETED
@@ -1,50 +0,0 @@
1
- import { Client } from '@vulog/aima-client';
2
-
3
- type ProductGroup = {
4
- id: string;
5
- name: string;
6
- status: 'ACTIVE' | 'INACTIVE';
7
- };
8
- type PromoCodeUsage = {
9
- id: number;
10
- walletUsage: 'TRIP' | 'PRODUCTS';
11
- discountCategory: 'CREDITS';
12
- percentage: number;
13
- amount: number;
14
- cappedPercentage: null;
15
- isOneTimeUsage: boolean;
16
- productGroup?: ProductGroup | null;
17
- };
18
- type PromoCode = {
19
- reference: string;
20
- walletType: string;
21
- status: 'ACTIVE' | 'INACTIVE';
22
- validityDuration: number;
23
- effectiveDate: string;
24
- expiryDate: string;
25
- validityEndDate: string;
26
- description?: string;
27
- id: number;
28
- fleetId: string;
29
- registration: boolean;
30
- maxUses: number;
31
- usages: PromoCodeUsage[];
32
- [key: string]: any;
33
- };
34
- type ReferralInfo = {
35
- referralUserId: string;
36
- referralCode: string;
37
- referralPromocodeId: number;
38
- refereePromocodeId: number;
39
- };
40
-
41
- declare const checkInvitationCode: (client: Client, referralCode: string) => Promise<ReferralInfo | undefined>;
42
-
43
- declare const getPromoCodeByReference: (client: Client, reference: string) => Promise<PromoCode | undefined>;
44
- declare const getPromoCodeById: (client: Client, id: number) => Promise<PromoCode | undefined>;
45
-
46
- declare const submitPromoCode: (client: Client, userId: string, entityId: string, code: string) => Promise<string>;
47
-
48
- declare const submitReferral: (client: Client, userId: string, entityId: string, code: string) => Promise<void>;
49
-
50
- export { type ProductGroup, type PromoCode, type PromoCodeUsage, type ReferralInfo, checkInvitationCode, getPromoCodeById, getPromoCodeByReference, submitPromoCode, submitReferral };
package/dist/index.js DELETED
@@ -1,119 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- checkInvitationCode: () => checkInvitationCode,
24
- getPromoCodeById: () => getPromoCodeById,
25
- getPromoCodeByReference: () => getPromoCodeByReference,
26
- submitPromoCode: () => submitPromoCode,
27
- submitReferral: () => submitReferral
28
- });
29
- module.exports = __toCommonJS(index_exports);
30
-
31
- // src/checkInvitationCode.ts
32
- var import_zod = require("zod");
33
- var checkInvitationCode = async (client, referralCode) => {
34
- const result = import_zod.z.string().trim().min(1).safeParse(referralCode);
35
- if (!result.success) {
36
- throw new TypeError("Invalid referralCode", {
37
- cause: result.error.issues
38
- });
39
- }
40
- return client.get(`boapi/proxy/user/fleets/${client.clientOptions.fleetId}/invitation/check/${referralCode}`).then(({ data }) => data).catch((error) => {
41
- if (error.formattedError?.status === 404) {
42
- return void 0;
43
- }
44
- throw error;
45
- });
46
- };
47
-
48
- // src/getPromoCode.ts
49
- var import_zod2 = require("zod");
50
- var getPromoCodeByReference = async (client, reference) => {
51
- const result = import_zod2.z.string().trim().min(1).safeParse(reference);
52
- if (!result.success) {
53
- throw new TypeError("Invalid reference", {
54
- cause: result.error.issues
55
- });
56
- }
57
- return client.get(`boapi/proxy/billing/fleets/${client.clientOptions.fleetId}/promoCodes?reference=${reference}`).then(({ data: [r] }) => r);
58
- };
59
- var getPromoCodeById = async (client, id) => {
60
- const result = import_zod2.z.number().positive().safeParse(id);
61
- if (!result.success) {
62
- throw new TypeError("Invalid id", {
63
- cause: result.error.issues
64
- });
65
- }
66
- return client.get(`boapi/proxy/billing/fleets/${client.clientOptions.fleetId}/promoCodes/${id}`).then(({ data }) => data).catch((error) => {
67
- if (error.formattedError?.status === 404) {
68
- return void 0;
69
- }
70
- throw error;
71
- });
72
- };
73
-
74
- // src/submitPromoCode.ts
75
- var import_zod3 = require("zod");
76
- var schema = import_zod3.z.object({
77
- userId: import_zod3.z.string().uuid(),
78
- entityId: import_zod3.z.string().uuid(),
79
- code: import_zod3.z.string().min(1)
80
- });
81
- var submitPromoCode = async (client, userId, entityId, code) => {
82
- const result = schema.safeParse({ userId, entityId, code });
83
- if (!result.success) {
84
- throw new TypeError("Invalid args", {
85
- cause: result.error.issues
86
- });
87
- }
88
- return client.put(`boapi/proxy/user/billing/fleets/${client.clientOptions.fleetId}/promoCodes/redeem/${code}`, {
89
- userId,
90
- entityId
91
- }).then(({ data }) => data);
92
- };
93
-
94
- // src/submitReferral.ts
95
- var import_zod4 = require("zod");
96
- var schema2 = import_zod4.z.object({
97
- userId: import_zod4.z.string().uuid(),
98
- entityId: import_zod4.z.string().uuid(),
99
- code: import_zod4.z.string().min(1)
100
- });
101
- var submitReferral = async (client, userId, entityId, code) => {
102
- const result = schema2.safeParse({ userId, entityId, code });
103
- if (!result.success) {
104
- throw new TypeError("Invalid args", {
105
- cause: result.error.issues
106
- });
107
- }
108
- await client.post(
109
- `boapi/proxy/user/fleets/${client.clientOptions.fleetId}/invitation/users/${userId}/entity/${entityId}/redeem/${code}`
110
- );
111
- };
112
- // Annotate the CommonJS export names for ESM import in node:
113
- 0 && (module.exports = {
114
- checkInvitationCode,
115
- getPromoCodeById,
116
- getPromoCodeByReference,
117
- submitPromoCode,
118
- submitReferral
119
- });
File without changes