shred-api-client 2.0.9 → 2.0.10-rc.1

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 (127) hide show
  1. package/dist/index.d.mts +2596 -0
  2. package/dist/index.d.ts +2596 -15
  3. package/dist/index.js +1788 -40
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +1747 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +6 -5
  8. package/dist/api/AppConfig.api.d.ts +0 -9
  9. package/dist/api/AppConfig.api.js +0 -42
  10. package/dist/api/Email.api.d.ts +0 -10
  11. package/dist/api/Email.api.js +0 -42
  12. package/dist/api/Goal.api.d.ts +0 -10
  13. package/dist/api/Goal.api.js +0 -42
  14. package/dist/api/Note.api.d.ts +0 -13
  15. package/dist/api/Note.api.js +0 -60
  16. package/dist/api/Notification.api.d.ts +0 -18
  17. package/dist/api/Notification.api.js +0 -80
  18. package/dist/api/Project.api.d.ts +0 -26
  19. package/dist/api/Project.api.js +0 -122
  20. package/dist/api/Prompt.api.d.ts +0 -14
  21. package/dist/api/Prompt.api.js +0 -41
  22. package/dist/api/Subscription.api.d.ts +0 -18
  23. package/dist/api/Subscription.api.js +0 -69
  24. package/dist/api/Tenant.api.d.ts +0 -14
  25. package/dist/api/Tenant.api.js +0 -47
  26. package/dist/api/Track.api.d.ts +0 -9
  27. package/dist/api/Track.api.js +0 -19
  28. package/dist/api/User.api.d.ts +0 -25
  29. package/dist/api/User.api.js +0 -98
  30. package/dist/model/Api.d.ts +0 -26
  31. package/dist/model/Api.js +0 -33
  32. package/dist/model/Context.d.ts +0 -5
  33. package/dist/model/Context.js +0 -2
  34. package/dist/model/Env.d.ts +0 -2
  35. package/dist/model/Env.js +0 -2
  36. package/dist/model/app-config/AppConfig.api.d.ts +0 -9
  37. package/dist/model/app-config/AppConfig.api.js +0 -9
  38. package/dist/model/app-config/index.d.ts +0 -1
  39. package/dist/model/app-config/index.js +0 -17
  40. package/dist/model/asset/Asset.schema.d.ts +0 -43
  41. package/dist/model/asset/Asset.schema.js +0 -19
  42. package/dist/model/asset/index.d.ts +0 -2
  43. package/dist/model/asset/index.js +0 -5
  44. package/dist/model/core/APIResponse.d.ts +0 -6
  45. package/dist/model/core/APIResponse.js +0 -2
  46. package/dist/model/core/Query.d.ts +0 -15
  47. package/dist/model/core/Query.js +0 -2
  48. package/dist/model/core/index.d.ts +0 -2
  49. package/dist/model/core/index.js +0 -18
  50. package/dist/model/email/Email.api.d.ts +0 -11
  51. package/dist/model/email/Email.api.js +0 -9
  52. package/dist/model/email/Email.schema.d.ts +0 -15
  53. package/dist/model/email/Email.schema.js +0 -9
  54. package/dist/model/email/index.d.ts +0 -3
  55. package/dist/model/email/index.js +0 -20
  56. package/dist/model/exceptions/ConflictException.d.ts +0 -4
  57. package/dist/model/exceptions/ConflictException.js +0 -13
  58. package/dist/model/exceptions/ForbiddenException.d.ts +0 -4
  59. package/dist/model/exceptions/ForbiddenException.js +0 -13
  60. package/dist/model/exceptions/InvalidArgumentException.d.ts +0 -4
  61. package/dist/model/exceptions/InvalidArgumentException.js +0 -13
  62. package/dist/model/exceptions/ResourceNotFoundException.d.ts +0 -4
  63. package/dist/model/exceptions/ResourceNotFoundException.js +0 -13
  64. package/dist/model/exceptions/ShredException.d.ts +0 -4
  65. package/dist/model/exceptions/ShredException.js +0 -10
  66. package/dist/model/exceptions/UnauthorizedException.d.ts +0 -4
  67. package/dist/model/exceptions/UnauthorizedException.js +0 -13
  68. package/dist/model/exceptions/index.d.ts +0 -16
  69. package/dist/model/exceptions/index.js +0 -20
  70. package/dist/model/goal/Goal.api.d.ts +0 -11
  71. package/dist/model/goal/Goal.api.js +0 -6
  72. package/dist/model/goal/Goal.schema.d.ts +0 -154
  73. package/dist/model/goal/Goal.schema.js +0 -26
  74. package/dist/model/goal/index.d.ts +0 -3
  75. package/dist/model/goal/index.js +0 -22
  76. package/dist/model/note/Note.api.d.ts +0 -26
  77. package/dist/model/note/Note.api.js +0 -21
  78. package/dist/model/note/Note.schema.d.ts +0 -141
  79. package/dist/model/note/Note.schema.js +0 -30
  80. package/dist/model/note/index.d.ts +0 -3
  81. package/dist/model/note/index.js +0 -21
  82. package/dist/model/notification/Notification.api.d.ts +0 -47
  83. package/dist/model/notification/Notification.api.js +0 -13
  84. package/dist/model/notification/Notification.schema.d.ts +0 -454
  85. package/dist/model/notification/Notification.schema.js +0 -111
  86. package/dist/model/notification/index.d.ts +0 -3
  87. package/dist/model/notification/index.js +0 -30
  88. package/dist/model/project/Project.api.d.ts +0 -83
  89. package/dist/model/project/Project.api.js +0 -26
  90. package/dist/model/project/Project.schema.d.ts +0 -209
  91. package/dist/model/project/Project.schema.js +0 -60
  92. package/dist/model/project/index.d.ts +0 -3
  93. package/dist/model/project/index.js +0 -24
  94. package/dist/model/prompt/Prompt.api.d.ts +0 -31
  95. package/dist/model/prompt/Prompt.api.js +0 -25
  96. package/dist/model/prompt/Prompt.schema.d.ts +0 -165
  97. package/dist/model/prompt/Prompt.schema.js +0 -24
  98. package/dist/model/prompt/index.d.ts +0 -3
  99. package/dist/model/prompt/index.js +0 -22
  100. package/dist/model/subscription/Subscription.api.d.ts +0 -59
  101. package/dist/model/subscription/Subscription.api.js +0 -49
  102. package/dist/model/subscription/Subscription.schema.d.ts +0 -314
  103. package/dist/model/subscription/Subscription.schema.js +0 -53
  104. package/dist/model/subscription/index.d.ts +0 -3
  105. package/dist/model/subscription/index.js +0 -25
  106. package/dist/model/tenant/Tenant.api.d.ts +0 -35
  107. package/dist/model/tenant/Tenant.api.js +0 -29
  108. package/dist/model/tenant/Tenant.schema.d.ts +0 -342
  109. package/dist/model/tenant/Tenant.schema.js +0 -29
  110. package/dist/model/tenant/index.d.ts +0 -3
  111. package/dist/model/tenant/index.js +0 -21
  112. package/dist/model/track/Track.api.d.ts +0 -10
  113. package/dist/model/track/Track.api.js +0 -9
  114. package/dist/model/track/Track.schema.d.ts +0 -44
  115. package/dist/model/track/Track.schema.js +0 -14
  116. package/dist/model/track/index.d.ts +0 -3
  117. package/dist/model/track/index.js +0 -21
  118. package/dist/model/user/User.api.d.ts +0 -86
  119. package/dist/model/user/User.api.js +0 -21
  120. package/dist/model/user/User.schema.d.ts +0 -117
  121. package/dist/model/user/User.schema.js +0 -42
  122. package/dist/model/user/index.d.ts +0 -3
  123. package/dist/model/user/index.js +0 -23
  124. package/dist/util/HTTPClient.d.ts +0 -5
  125. package/dist/util/HTTPClient.js +0 -71
  126. package/dist/util/parseQuery.d.ts +0 -2
  127. package/dist/util/parseQuery.js +0 -25
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Endpoints = void 0;
4
- exports.Endpoints = {
5
- GetProduct: {
6
- uri: "/subscriptions/products/public/retrieve/",
7
- method: "GET",
8
- },
9
- GetActiveSubscription: {
10
- uri: "/subscriptions/active/",
11
- method: "GET",
12
- },
13
- GetCharges: {
14
- uri: "/subscriptions/payment/charge/list/",
15
- method: "GET",
16
- },
17
- GetUserActiveSubscription: {
18
- uri: "/subscriptions/:userId/find/",
19
- method: "GET",
20
- },
21
- GetProducts: {
22
- uri: "/subscriptions/products/public/list/",
23
- method: "GET",
24
- },
25
- GetProductsByUser: {
26
- uri: "/subscriptions/products/list/",
27
- method: "GET",
28
- },
29
- Checkout: {
30
- uri: "/subscriptions/payment/checkout/",
31
- method: "POST",
32
- },
33
- Charge: {
34
- uri: "/subscriptions/payment/charge/",
35
- method: "POST",
36
- },
37
- Pause: {
38
- uri: "/subscriptions/pause/",
39
- method: "PUT",
40
- },
41
- Resume: {
42
- uri: "/subscriptions/resume/",
43
- method: "PUT",
44
- },
45
- UpdatePlan: {
46
- uri: "/subscriptions/plan/update/",
47
- method: "PUT",
48
- },
49
- };
@@ -1,314 +0,0 @@
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>;
@@ -1,53 +0,0 @@
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
- });
@@ -1,3 +0,0 @@
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";
@@ -1,25 +0,0 @@
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,35 +0,0 @@
1
- import Context from "../Context";
2
- import { Tenant } from "./Tenant.schema";
3
- export interface IAPI {
4
- getByInviteCode: (code: string, context?: Context) => Promise<Tenant | null>;
5
- create: (tenant: Tenant, context: Context) => Promise<boolean>;
6
- list: (context: Context) => Promise<Tenant[]>;
7
- getTenant: (context: Context, tenantId?: string) => Promise<Tenant | null>;
8
- update: (tenantId: string, data: Pick<Tenant, "preferences">, context: Context) => Promise<boolean>;
9
- }
10
- export declare const Endpoints: {
11
- GetByInviteCode: {
12
- uri: string;
13
- method: string;
14
- };
15
- CreateTenant: {
16
- uri: string;
17
- method: string;
18
- };
19
- GetTenant: {
20
- uri: string;
21
- method: string;
22
- };
23
- GetTenantById: {
24
- uri: string;
25
- method: string;
26
- };
27
- UpdateTenant: {
28
- uri: string;
29
- method: string;
30
- };
31
- ListAll: {
32
- uri: string;
33
- method: string;
34
- };
35
- };
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Endpoints = void 0;
4
- exports.Endpoints = {
5
- GetByInviteCode: {
6
- uri: "/tenants/public/invitation/",
7
- method: "GET",
8
- },
9
- CreateTenant: {
10
- uri: "/tenants/create",
11
- method: "PUT",
12
- },
13
- GetTenant: {
14
- uri: "/tenants/me",
15
- method: "GET",
16
- },
17
- GetTenantById: {
18
- uri: "/tenants/:tenantId/find",
19
- method: "GET",
20
- },
21
- UpdateTenant: {
22
- uri: "/tenants/update",
23
- method: "POST",
24
- },
25
- ListAll: {
26
- uri: "/tenants/list",
27
- method: "GET",
28
- },
29
- };