shred-api-client 1.14.3 → 1.14.4-rc.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.
Files changed (114) hide show
  1. package/dist/api/AppConfig.api.d.ts +2 -2
  2. package/dist/api/AppConfig.api.js +25 -2
  3. package/dist/api/Email.api.d.ts +3 -3
  4. package/dist/api/Email.api.js +25 -2
  5. package/dist/api/Goal.api.d.ts +10 -0
  6. package/dist/api/Goal.api.js +42 -0
  7. package/dist/api/Note.api.d.ts +0 -0
  8. package/dist/api/Note.api.js +1 -0
  9. package/dist/api/Notification.api.d.ts +8 -8
  10. package/dist/api/Notification.api.js +32 -9
  11. package/dist/api/Project.api.d.ts +8 -8
  12. package/dist/api/Project.api.js +38 -18
  13. package/dist/api/Prompt.api.d.ts +6 -6
  14. package/dist/api/Prompt.api.js +6 -6
  15. package/dist/api/Subscription.api.d.ts +6 -6
  16. package/dist/api/Subscription.api.js +12 -12
  17. package/dist/api/Tenant.api.d.ts +7 -7
  18. package/dist/api/Tenant.api.js +7 -7
  19. package/dist/api/Track.api.d.ts +3 -3
  20. package/dist/api/Track.api.js +2 -2
  21. package/dist/api/User.api.d.ts +6 -6
  22. package/dist/api/User.api.js +15 -15
  23. package/dist/index.d.ts +13 -5
  24. package/dist/index.js +26 -16
  25. package/dist/model/Api.d.ts +20 -39
  26. package/dist/model/Api.js +3 -1
  27. package/dist/model/app-config/AppConfig.api.d.ts +9 -0
  28. package/dist/model/{AppConfig.schema.js → app-config/AppConfig.api.js} +2 -3
  29. package/dist/model/app-config/index.d.ts +1 -0
  30. package/dist/model/app-config/index.js +17 -0
  31. package/dist/model/asset/index.d.ts +2 -0
  32. package/dist/model/asset/index.js +5 -0
  33. package/dist/model/core/APIResponse.d.ts +6 -0
  34. package/dist/model/core/APIResponse.js +2 -0
  35. package/dist/model/core/Query.d.ts +15 -0
  36. package/dist/model/core/Query.js +2 -0
  37. package/dist/model/core/index.d.ts +2 -0
  38. package/dist/model/core/index.js +18 -0
  39. package/dist/model/email/Email.api.d.ts +11 -0
  40. package/dist/model/{Email.schema.js → email/Email.api.js} +2 -3
  41. package/dist/model/email/Email.schema.d.ts +15 -0
  42. package/dist/model/email/Email.schema.js +9 -0
  43. package/dist/model/email/index.d.ts +3 -0
  44. package/dist/model/email/index.js +20 -0
  45. package/dist/model/exceptions/index.d.ts +3 -2
  46. package/dist/model/exceptions/index.js +2 -1
  47. package/dist/model/goal/Goal.api.d.ts +11 -0
  48. package/dist/model/goal/Goal.api.js +6 -0
  49. package/dist/model/goal/Goal.schema.d.ts +154 -0
  50. package/dist/model/goal/Goal.schema.js +26 -0
  51. package/dist/model/goal/index.d.ts +3 -0
  52. package/dist/model/goal/index.js +22 -0
  53. package/dist/model/note/Note.api.d.ts +26 -0
  54. package/dist/model/note/Note.api.js +21 -0
  55. package/dist/model/note/Note.schema.d.ts +141 -0
  56. package/dist/model/note/Note.schema.js +30 -0
  57. package/dist/model/note/index.d.ts +2 -0
  58. package/dist/model/note/index.js +6 -0
  59. package/dist/model/notification/Notification.api.d.ts +47 -0
  60. package/dist/model/notification/Notification.api.js +13 -0
  61. package/dist/model/notification/Notification.schema.d.ts +454 -0
  62. package/dist/model/notification/Notification.schema.js +111 -0
  63. package/dist/model/notification/index.d.ts +3 -0
  64. package/dist/model/notification/index.js +30 -0
  65. package/dist/model/project/Project.api.d.ts +66 -0
  66. package/dist/model/project/Project.api.js +20 -0
  67. package/dist/model/project/Project.schema.d.ts +206 -0
  68. package/dist/model/{Project.schema.js → project/Project.schema.js} +31 -52
  69. package/dist/model/project/index.d.ts +3 -0
  70. package/dist/model/project/index.js +24 -0
  71. package/dist/model/{Prompt.schema.d.ts → prompt/Prompt.api.d.ts} +4 -24
  72. package/dist/model/{Prompt.schema.js → prompt/Prompt.api.js} +2 -3
  73. package/dist/model/prompt/Prompt.schema.d.ts +165 -0
  74. package/dist/model/prompt/Prompt.schema.js +24 -0
  75. package/dist/model/prompt/index.d.ts +3 -0
  76. package/dist/model/prompt/index.js +22 -0
  77. package/dist/model/{Subscription.schema.d.ts → subscription/Subscription.api.d.ts} +4 -51
  78. package/dist/model/{Subscription.schema.js → subscription/Subscription.api.js} +2 -8
  79. package/dist/model/subscription/Subscription.schema.d.ts +314 -0
  80. package/dist/model/subscription/Subscription.schema.js +53 -0
  81. package/dist/model/subscription/index.d.ts +3 -0
  82. package/dist/model/subscription/index.js +25 -0
  83. package/dist/model/{Tenant.schema.d.ts → tenant/Tenant.api.d.ts} +4 -29
  84. package/dist/model/{Tenant.schema.js → tenant/Tenant.api.js} +2 -3
  85. package/dist/model/tenant/Tenant.schema.d.ts +342 -0
  86. package/dist/model/tenant/Tenant.schema.js +29 -0
  87. package/dist/model/tenant/index.d.ts +3 -0
  88. package/dist/model/tenant/index.js +21 -0
  89. package/dist/model/track/Track.api.d.ts +10 -0
  90. package/dist/model/{Track.schema.js → track/Track.api.js} +2 -3
  91. package/dist/model/track/Track.schema.d.ts +44 -0
  92. package/dist/model/track/Track.schema.js +14 -0
  93. package/dist/model/track/index.d.ts +3 -0
  94. package/dist/model/track/index.js +21 -0
  95. package/dist/model/user/User.api.d.ts +80 -0
  96. package/dist/model/user/User.api.js +20 -0
  97. package/dist/model/user/User.schema.d.ts +117 -0
  98. package/dist/model/user/User.schema.js +42 -0
  99. package/dist/model/user/index.d.ts +3 -0
  100. package/dist/model/user/index.js +23 -0
  101. package/dist/util/parseQuery.d.ts +2 -2
  102. package/package.json +1 -1
  103. package/dist/model/AppConfig.schema.d.ts +0 -10
  104. package/dist/model/Email.schema.d.ts +0 -17
  105. package/dist/model/Notification.schema.d.ts +0 -112
  106. package/dist/model/Notification.schema.js +0 -38
  107. package/dist/model/Project.schema.d.ts +0 -152
  108. package/dist/model/Track.schema.d.ts +0 -20
  109. package/dist/model/User.schema.d.ts +0 -253
  110. package/dist/model/User.schema.js +0 -97
  111. package/dist/namespace.d.ts +0 -259
  112. package/dist/namespace.js +0 -53
  113. package/dist/model/{Asset.schema.d.ts → asset/Asset.schema.d.ts} +4 -4
  114. /package/dist/model/{Asset.schema.js → asset/Asset.schema.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubscriptionEndpoints = exports.SubscriptionType = void 0;
4
- const SubscriptionEndpoints = {
3
+ exports.Endpoints = void 0;
4
+ exports.Endpoints = {
5
5
  GetProduct: {
6
6
  uri: "/subscriptions/products/public/retrieve/",
7
7
  method: "GET",
@@ -47,9 +47,3 @@ const SubscriptionEndpoints = {
47
47
  method: "PUT",
48
48
  },
49
49
  };
50
- exports.SubscriptionEndpoints = SubscriptionEndpoints;
51
- var SubscriptionType;
52
- (function (SubscriptionType) {
53
- SubscriptionType[SubscriptionType["CUSTOMER_SUBSCRIPTION"] = 0] = "CUSTOMER_SUBSCRIPTION";
54
- SubscriptionType[SubscriptionType["TENANT_SUBSCRIPTION"] = 1] = "TENANT_SUBSCRIPTION";
55
- })(SubscriptionType || (exports.SubscriptionType = SubscriptionType = {}));
@@ -0,0 +1,314 @@
1
+ import { z } from "zod";
2
+ export declare enum Type {
3
+ CUSTOMER_SUBSCRIPTION = 0,
4
+ TENANT_SUBSCRIPTION = 1
5
+ }
6
+ export declare const SubscriptionTypeSchema: z.ZodNativeEnum<typeof Type>;
7
+ export declare const PlanSchema: z.ZodObject<{
8
+ id: z.ZodString;
9
+ currency: z.ZodString;
10
+ price: z.ZodString;
11
+ interval: z.ZodString;
12
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
13
+ subscriptionItemId: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ id: string;
16
+ metadata: Record<string, string>;
17
+ interval: string;
18
+ price: string;
19
+ currency: string;
20
+ subscriptionItemId: string;
21
+ }, {
22
+ id: string;
23
+ metadata: Record<string, string>;
24
+ interval: string;
25
+ price: string;
26
+ currency: string;
27
+ subscriptionItemId: string;
28
+ }>;
29
+ export declare const DescriptionSchema: z.ZodObject<{
30
+ description: z.ZodString;
31
+ subtitle: z.ZodString;
32
+ }, "strip", z.ZodTypeAny, {
33
+ description: string;
34
+ subtitle: string;
35
+ }, {
36
+ description: string;
37
+ subtitle: string;
38
+ }>;
39
+ export declare const ProductSchema: z.ZodObject<{
40
+ id: z.ZodString;
41
+ name: z.ZodString;
42
+ descriptions: z.ZodArray<z.ZodObject<{
43
+ description: z.ZodString;
44
+ subtitle: z.ZodString;
45
+ }, "strip", z.ZodTypeAny, {
46
+ description: string;
47
+ subtitle: string;
48
+ }, {
49
+ description: string;
50
+ subtitle: string;
51
+ }>, "many">;
52
+ metadata: z.ZodAny;
53
+ plans: z.ZodArray<z.ZodObject<{
54
+ id: z.ZodString;
55
+ currency: z.ZodString;
56
+ price: z.ZodString;
57
+ interval: z.ZodString;
58
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
59
+ subscriptionItemId: z.ZodString;
60
+ }, "strip", z.ZodTypeAny, {
61
+ id: string;
62
+ metadata: Record<string, string>;
63
+ interval: string;
64
+ price: string;
65
+ currency: string;
66
+ subscriptionItemId: string;
67
+ }, {
68
+ id: string;
69
+ metadata: Record<string, string>;
70
+ interval: string;
71
+ price: string;
72
+ currency: string;
73
+ subscriptionItemId: string;
74
+ }>, "many">;
75
+ }, "strip", z.ZodTypeAny, {
76
+ id: string;
77
+ name: string;
78
+ descriptions: {
79
+ description: string;
80
+ subtitle: string;
81
+ }[];
82
+ plans: {
83
+ id: string;
84
+ metadata: Record<string, string>;
85
+ interval: string;
86
+ price: string;
87
+ currency: string;
88
+ subscriptionItemId: string;
89
+ }[];
90
+ metadata?: any;
91
+ }, {
92
+ id: string;
93
+ name: string;
94
+ descriptions: {
95
+ description: string;
96
+ subtitle: string;
97
+ }[];
98
+ plans: {
99
+ id: string;
100
+ metadata: Record<string, string>;
101
+ interval: string;
102
+ price: string;
103
+ currency: string;
104
+ subscriptionItemId: string;
105
+ }[];
106
+ metadata?: any;
107
+ }>;
108
+ export declare const ChargeSchema: z.ZodObject<{
109
+ id: z.ZodNumber;
110
+ created: z.ZodNumber;
111
+ paid: z.ZodBoolean;
112
+ receiptUrl: z.ZodString;
113
+ status: z.ZodString;
114
+ price: z.ZodString;
115
+ paymentType: z.ZodString;
116
+ last4: z.ZodOptional<z.ZodString>;
117
+ brand: z.ZodOptional<z.ZodString>;
118
+ }, "strip", z.ZodTypeAny, {
119
+ id: number;
120
+ status: string;
121
+ created: number;
122
+ paid: boolean;
123
+ receiptUrl: string;
124
+ price: string;
125
+ paymentType: string;
126
+ last4?: string | undefined;
127
+ brand?: string | undefined;
128
+ }, {
129
+ id: number;
130
+ status: string;
131
+ created: number;
132
+ paid: boolean;
133
+ receiptUrl: string;
134
+ price: string;
135
+ paymentType: string;
136
+ last4?: string | undefined;
137
+ brand?: string | undefined;
138
+ }>;
139
+ export declare const SubscriptionSchema: z.ZodObject<{
140
+ id: z.ZodString;
141
+ status: z.ZodString;
142
+ startDate: z.ZodOptional<z.ZodNumber>;
143
+ daysUntilDue: z.ZodOptional<z.ZodNumber>;
144
+ renewAutomatically: z.ZodOptional<z.ZodBoolean>;
145
+ currentPeriodStart: z.ZodOptional<z.ZodNumber>;
146
+ currentPeriodEnd: z.ZodOptional<z.ZodNumber>;
147
+ paymentMethodId: z.ZodOptional<z.ZodString>;
148
+ product: z.ZodObject<{
149
+ id: z.ZodString;
150
+ name: z.ZodString;
151
+ descriptions: z.ZodArray<z.ZodObject<{
152
+ description: z.ZodString;
153
+ subtitle: z.ZodString;
154
+ }, "strip", z.ZodTypeAny, {
155
+ description: string;
156
+ subtitle: string;
157
+ }, {
158
+ description: string;
159
+ subtitle: string;
160
+ }>, "many">;
161
+ metadata: z.ZodAny;
162
+ plans: z.ZodArray<z.ZodObject<{
163
+ id: z.ZodString;
164
+ currency: z.ZodString;
165
+ price: z.ZodString;
166
+ interval: z.ZodString;
167
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
168
+ subscriptionItemId: z.ZodString;
169
+ }, "strip", z.ZodTypeAny, {
170
+ id: string;
171
+ metadata: Record<string, string>;
172
+ interval: string;
173
+ price: string;
174
+ currency: string;
175
+ subscriptionItemId: string;
176
+ }, {
177
+ id: string;
178
+ metadata: Record<string, string>;
179
+ interval: string;
180
+ price: string;
181
+ currency: string;
182
+ subscriptionItemId: string;
183
+ }>, "many">;
184
+ }, "strip", z.ZodTypeAny, {
185
+ id: string;
186
+ name: string;
187
+ descriptions: {
188
+ description: string;
189
+ subtitle: string;
190
+ }[];
191
+ plans: {
192
+ id: string;
193
+ metadata: Record<string, string>;
194
+ interval: string;
195
+ price: string;
196
+ currency: string;
197
+ subscriptionItemId: string;
198
+ }[];
199
+ metadata?: any;
200
+ }, {
201
+ id: string;
202
+ name: string;
203
+ descriptions: {
204
+ description: string;
205
+ subtitle: string;
206
+ }[];
207
+ plans: {
208
+ id: string;
209
+ metadata: Record<string, string>;
210
+ interval: string;
211
+ price: string;
212
+ currency: string;
213
+ subscriptionItemId: string;
214
+ }[];
215
+ metadata?: any;
216
+ }>;
217
+ type: z.ZodOptional<z.ZodNativeEnum<typeof Type>>;
218
+ plan: z.ZodOptional<z.ZodObject<{
219
+ id: z.ZodString;
220
+ currency: z.ZodString;
221
+ price: z.ZodString;
222
+ interval: z.ZodString;
223
+ metadata: z.ZodRecord<z.ZodString, z.ZodString>;
224
+ subscriptionItemId: z.ZodString;
225
+ }, "strip", z.ZodTypeAny, {
226
+ id: string;
227
+ metadata: Record<string, string>;
228
+ interval: string;
229
+ price: string;
230
+ currency: string;
231
+ subscriptionItemId: string;
232
+ }, {
233
+ id: string;
234
+ metadata: Record<string, string>;
235
+ interval: string;
236
+ price: string;
237
+ currency: string;
238
+ subscriptionItemId: string;
239
+ }>>;
240
+ }, "strip", z.ZodTypeAny, {
241
+ id: string;
242
+ status: string;
243
+ product: {
244
+ id: string;
245
+ name: string;
246
+ descriptions: {
247
+ description: string;
248
+ subtitle: string;
249
+ }[];
250
+ plans: {
251
+ id: string;
252
+ metadata: Record<string, string>;
253
+ interval: string;
254
+ price: string;
255
+ currency: string;
256
+ subscriptionItemId: string;
257
+ }[];
258
+ metadata?: any;
259
+ };
260
+ type?: Type | undefined;
261
+ startDate?: number | undefined;
262
+ daysUntilDue?: number | undefined;
263
+ renewAutomatically?: boolean | undefined;
264
+ currentPeriodStart?: number | undefined;
265
+ currentPeriodEnd?: number | undefined;
266
+ paymentMethodId?: string | undefined;
267
+ plan?: {
268
+ id: string;
269
+ metadata: Record<string, string>;
270
+ interval: string;
271
+ price: string;
272
+ currency: string;
273
+ subscriptionItemId: string;
274
+ } | undefined;
275
+ }, {
276
+ id: string;
277
+ status: string;
278
+ product: {
279
+ id: string;
280
+ name: string;
281
+ descriptions: {
282
+ description: string;
283
+ subtitle: string;
284
+ }[];
285
+ plans: {
286
+ id: string;
287
+ metadata: Record<string, string>;
288
+ interval: string;
289
+ price: string;
290
+ currency: string;
291
+ subscriptionItemId: string;
292
+ }[];
293
+ metadata?: any;
294
+ };
295
+ type?: Type | undefined;
296
+ startDate?: number | undefined;
297
+ daysUntilDue?: number | undefined;
298
+ renewAutomatically?: boolean | undefined;
299
+ currentPeriodStart?: number | undefined;
300
+ currentPeriodEnd?: number | undefined;
301
+ paymentMethodId?: string | undefined;
302
+ plan?: {
303
+ id: string;
304
+ metadata: Record<string, string>;
305
+ interval: string;
306
+ price: string;
307
+ currency: string;
308
+ subscriptionItemId: string;
309
+ } | undefined;
310
+ }>;
311
+ export type Subscription = z.infer<typeof SubscriptionSchema>;
312
+ export type Charge = z.infer<typeof ChargeSchema>;
313
+ export type Plan = z.infer<typeof PlanSchema>;
314
+ export type Product = z.infer<typeof ProductSchema>;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionSchema = exports.ChargeSchema = exports.ProductSchema = exports.DescriptionSchema = exports.PlanSchema = exports.SubscriptionTypeSchema = exports.Type = void 0;
4
+ const zod_1 = require("zod");
5
+ var Type;
6
+ (function (Type) {
7
+ Type[Type["CUSTOMER_SUBSCRIPTION"] = 0] = "CUSTOMER_SUBSCRIPTION";
8
+ Type[Type["TENANT_SUBSCRIPTION"] = 1] = "TENANT_SUBSCRIPTION";
9
+ })(Type || (exports.Type = Type = {}));
10
+ exports.SubscriptionTypeSchema = zod_1.z.nativeEnum(Type);
11
+ exports.PlanSchema = zod_1.z.object({
12
+ id: zod_1.z.string(),
13
+ currency: zod_1.z.string(),
14
+ price: zod_1.z.string(),
15
+ interval: zod_1.z.string(),
16
+ metadata: zod_1.z.record(zod_1.z.string()),
17
+ subscriptionItemId: zod_1.z.string(),
18
+ });
19
+ exports.DescriptionSchema = zod_1.z.object({
20
+ description: zod_1.z.string(),
21
+ subtitle: zod_1.z.string(),
22
+ });
23
+ exports.ProductSchema = zod_1.z.object({
24
+ id: zod_1.z.string(),
25
+ name: zod_1.z.string(),
26
+ descriptions: zod_1.z.array(exports.DescriptionSchema),
27
+ metadata: zod_1.z.any(),
28
+ plans: zod_1.z.array(exports.PlanSchema),
29
+ });
30
+ exports.ChargeSchema = zod_1.z.object({
31
+ id: zod_1.z.number(),
32
+ created: zod_1.z.number(),
33
+ paid: zod_1.z.boolean(),
34
+ receiptUrl: zod_1.z.string(),
35
+ status: zod_1.z.string(),
36
+ price: zod_1.z.string(),
37
+ paymentType: zod_1.z.string(),
38
+ last4: zod_1.z.string().optional(),
39
+ brand: zod_1.z.string().optional(),
40
+ });
41
+ exports.SubscriptionSchema = zod_1.z.object({
42
+ id: zod_1.z.string(),
43
+ status: zod_1.z.string(),
44
+ startDate: zod_1.z.number().optional(),
45
+ daysUntilDue: zod_1.z.number().optional(),
46
+ renewAutomatically: zod_1.z.boolean().optional(),
47
+ currentPeriodStart: zod_1.z.number().optional(),
48
+ currentPeriodEnd: zod_1.z.number().optional(),
49
+ paymentMethodId: zod_1.z.string().optional(),
50
+ product: exports.ProductSchema,
51
+ type: zod_1.z.nativeEnum(Type).optional(),
52
+ plan: exports.PlanSchema.optional(),
53
+ });
@@ -0,0 +1,3 @@
1
+ export type { Subscription as Entity, Product, Plan, Charge, } from "./Subscription.schema";
2
+ export { SubscriptionSchema, ProductSchema, PlanSchema, ChargeSchema, Type, SubscriptionTypeSchema, } from "./Subscription.schema";
3
+ export * from "./Subscription.api";
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.SubscriptionTypeSchema = exports.Type = exports.ChargeSchema = exports.PlanSchema = exports.ProductSchema = exports.SubscriptionSchema = void 0;
18
+ var Subscription_schema_1 = require("./Subscription.schema");
19
+ Object.defineProperty(exports, "SubscriptionSchema", { enumerable: true, get: function () { return Subscription_schema_1.SubscriptionSchema; } });
20
+ Object.defineProperty(exports, "ProductSchema", { enumerable: true, get: function () { return Subscription_schema_1.ProductSchema; } });
21
+ Object.defineProperty(exports, "PlanSchema", { enumerable: true, get: function () { return Subscription_schema_1.PlanSchema; } });
22
+ Object.defineProperty(exports, "ChargeSchema", { enumerable: true, get: function () { return Subscription_schema_1.ChargeSchema; } });
23
+ Object.defineProperty(exports, "Type", { enumerable: true, get: function () { return Subscription_schema_1.Type; } });
24
+ Object.defineProperty(exports, "SubscriptionTypeSchema", { enumerable: true, get: function () { return Subscription_schema_1.SubscriptionTypeSchema; } });
25
+ __exportStar(require("./Subscription.api"), exports);
@@ -1,13 +1,13 @@
1
- import { Subscription } from "./Subscription.schema";
2
- import Context from "./Context";
3
- interface TenantAPISchema {
1
+ import Context from "../Context";
2
+ import { Tenant } from "./Tenant.schema";
3
+ export interface IAPI {
4
4
  getByInviteCode: (code: string, context?: Context) => Promise<Tenant | null>;
5
5
  create: (tenant: Tenant, context: Context) => Promise<boolean>;
6
6
  list: (context: Context) => Promise<Tenant[]>;
7
7
  getTenant: (context: Context, tenantId?: string) => Promise<Tenant | null>;
8
8
  update: (tenantId: string, data: Pick<Tenant, "preferences">, context: Context) => Promise<boolean>;
9
9
  }
10
- declare const TenantEndpoints: {
10
+ export declare const Endpoints: {
11
11
  GetByInviteCode: {
12
12
  uri: string;
13
13
  method: string;
@@ -33,28 +33,3 @@ declare const TenantEndpoints: {
33
33
  method: string;
34
34
  };
35
35
  };
36
- type Preferences = {
37
- iconUrl: string;
38
- logoUrl: string;
39
- primaryColor: string;
40
- secondaryColor: string;
41
- guidelinesUrl?: string;
42
- };
43
- type Tenant = {
44
- id: string;
45
- name: string;
46
- isActive: boolean;
47
- isSubscriptionActive: boolean;
48
- preferences: Preferences;
49
- inviteCode: string;
50
- totalUsersAllowed: number;
51
- currentUsersSize?: number;
52
- chargeByEmail: boolean;
53
- defaultProductId?: string;
54
- defaultPlanId?: string;
55
- defaultCoupomCode?: string;
56
- allowedProducts?: string[];
57
- useOwnScripts?: boolean;
58
- subscription?: Subscription;
59
- };
60
- export { Tenant, TenantEndpoints, TenantAPISchema };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TenantEndpoints = void 0;
4
- const TenantEndpoints = {
3
+ exports.Endpoints = void 0;
4
+ exports.Endpoints = {
5
5
  GetByInviteCode: {
6
6
  uri: "/tenants/public/invitation/",
7
7
  method: "GET",
@@ -27,4 +27,3 @@ const TenantEndpoints = {
27
27
  method: "GET",
28
28
  },
29
29
  };
30
- exports.TenantEndpoints = TenantEndpoints;