@farthershore/client 0.0.0-stage → 0.2.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.
- package/CHANGELOG.md +196 -0
- package/README.md +252 -2
- package/dist/index.js +7009 -0
- package/dist/types/api.generated.d.ts +1362 -0
- package/dist/types/credentials.d.ts +78 -0
- package/dist/types/envelope.d.ts +48 -0
- package/dist/types/errors.d.ts +86 -0
- package/dist/types/generated/schemas.d.ts +3670 -0
- package/dist/types/helpers/abort.d.ts +7 -0
- package/dist/types/helpers/paginate.d.ts +32 -0
- package/dist/types/helpers/poll.d.ts +26 -0
- package/dist/types/helpers/refs.d.ts +84 -0
- package/dist/types/helpers/wait-for-frontend-build.d.ts +51 -0
- package/dist/types/index.d.ts +24 -0
- package/dist/types/operations/agents.d.ts +240 -0
- package/dist/types/operations/agreements.d.ts +174 -0
- package/dist/types/operations/analytics.d.ts +47 -0
- package/dist/types/operations/audit-notifications.d.ts +90 -0
- package/dist/types/operations/auth.d.ts +24 -0
- package/dist/types/operations/backends.d.ts +255 -0
- package/dist/types/operations/billing.d.ts +71 -0
- package/dist/types/operations/businesses.d.ts +795 -0
- package/dist/types/operations/change-sets.d.ts +462 -0
- package/dist/types/operations/consumers.d.ts +168 -0
- package/dist/types/operations/define.d.ts +102 -0
- package/dist/types/operations/environments.d.ts +55 -0
- package/dist/types/operations/frontend.d.ts +31 -0
- package/dist/types/operations/index.d.ts +4773 -0
- package/dist/types/operations/maker-tokens.d.ts +194 -0
- package/dist/types/operations/organizations.d.ts +373 -0
- package/dist/types/operations/personas.d.ts +136 -0
- package/dist/types/operations/plans-usage.d.ts +84 -0
- package/dist/types/operations/platform.d.ts +455 -0
- package/dist/types/operations/portal.d.ts +442 -0
- package/dist/types/operations/promo-codes.d.ts +139 -0
- package/dist/types/operations/variables.d.ts +188 -0
- package/dist/types/operations/webhooks.d.ts +130 -0
- package/dist/types/surface-types.d.ts +76 -0
- package/dist/types/surface.d.ts +35 -0
- package/dist/types/transport.d.ts +114 -0
- package/dist/types/types.d.ts +440 -0
- package/dist/types/version.d.ts +8 -0
- package/package.json +53 -3
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
import { type RequestBody } from "./define.js";
|
|
2
|
+
type BusinessRef = {
|
|
3
|
+
businessId: string;
|
|
4
|
+
};
|
|
5
|
+
type Page = {
|
|
6
|
+
limit?: number;
|
|
7
|
+
offset?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const portalOperations: {
|
|
10
|
+
"portal.serviceAccounts.list": import("./define.js").OperationEntry<BusinessRef & Page, {
|
|
11
|
+
data: import("../generated/schemas.js").components["schemas"]["PortalServiceAccountListItem"][];
|
|
12
|
+
pagination: import("../generated/schemas.js").components["schemas"]["PortalOffsetPagination"];
|
|
13
|
+
}, {
|
|
14
|
+
data: import("../generated/schemas.js").components["schemas"]["PortalServiceAccountListItem"][];
|
|
15
|
+
pagination: import("../generated/schemas.js").components["schemas"]["PortalOffsetPagination"];
|
|
16
|
+
}>;
|
|
17
|
+
"portal.serviceAccounts.create": import("./define.js").OperationEntry<BusinessRef & {
|
|
18
|
+
body: RequestBody;
|
|
19
|
+
}, {
|
|
20
|
+
status: "ACTIVE";
|
|
21
|
+
serviceAccountId: string;
|
|
22
|
+
apiKeyId: string;
|
|
23
|
+
keyPrefix: string;
|
|
24
|
+
plaintext: string;
|
|
25
|
+
requestedPermissions: string[];
|
|
26
|
+
grantedPermissions: string[];
|
|
27
|
+
} | {
|
|
28
|
+
status: "PENDING";
|
|
29
|
+
serviceAccountId: string;
|
|
30
|
+
approvalId: string;
|
|
31
|
+
requestedPermissions: string[];
|
|
32
|
+
grantedPermissions: [];
|
|
33
|
+
excessPermissions: string[];
|
|
34
|
+
eligibleApproverIds: string[];
|
|
35
|
+
}, {
|
|
36
|
+
status: "ACTIVE";
|
|
37
|
+
serviceAccountId: string;
|
|
38
|
+
apiKeyId: string;
|
|
39
|
+
keyPrefix: string;
|
|
40
|
+
plaintext: string;
|
|
41
|
+
requestedPermissions: string[];
|
|
42
|
+
grantedPermissions: string[];
|
|
43
|
+
} | {
|
|
44
|
+
status: "PENDING";
|
|
45
|
+
serviceAccountId: string;
|
|
46
|
+
approvalId: string;
|
|
47
|
+
requestedPermissions: string[];
|
|
48
|
+
grantedPermissions: [];
|
|
49
|
+
excessPermissions: string[];
|
|
50
|
+
eligibleApproverIds: string[];
|
|
51
|
+
}>;
|
|
52
|
+
"portal.serviceAccounts.update": import("./define.js").OperationEntry<BusinessRef & {
|
|
53
|
+
serviceAccountId: string;
|
|
54
|
+
body: RequestBody;
|
|
55
|
+
}, {
|
|
56
|
+
status: "ACTIVE";
|
|
57
|
+
serviceAccountId: string;
|
|
58
|
+
requestedPermissions: string[];
|
|
59
|
+
grantedPermissions: string[];
|
|
60
|
+
} | {
|
|
61
|
+
status: "PENDING";
|
|
62
|
+
serviceAccountId: string;
|
|
63
|
+
approvalId: string;
|
|
64
|
+
activePermissions: string[];
|
|
65
|
+
requestedPermissions: string[];
|
|
66
|
+
excessPermissions: string[];
|
|
67
|
+
eligibleApproverIds: string[];
|
|
68
|
+
}, {
|
|
69
|
+
status: "ACTIVE";
|
|
70
|
+
serviceAccountId: string;
|
|
71
|
+
requestedPermissions: string[];
|
|
72
|
+
grantedPermissions: string[];
|
|
73
|
+
} | {
|
|
74
|
+
status: "PENDING";
|
|
75
|
+
serviceAccountId: string;
|
|
76
|
+
approvalId: string;
|
|
77
|
+
activePermissions: string[];
|
|
78
|
+
requestedPermissions: string[];
|
|
79
|
+
excessPermissions: string[];
|
|
80
|
+
eligibleApproverIds: string[];
|
|
81
|
+
}>;
|
|
82
|
+
"portal.serviceAccounts.approvals": import("./define.js").OperationEntry<BusinessRef & Page, {
|
|
83
|
+
data: import("../generated/schemas.js").components["schemas"]["PortalServiceAccountPendingApproval"][];
|
|
84
|
+
pagination: import("../generated/schemas.js").components["schemas"]["PortalOffsetPagination"];
|
|
85
|
+
}, {
|
|
86
|
+
data: import("../generated/schemas.js").components["schemas"]["PortalServiceAccountPendingApproval"][];
|
|
87
|
+
pagination: import("../generated/schemas.js").components["schemas"]["PortalOffsetPagination"];
|
|
88
|
+
}>;
|
|
89
|
+
"portal.serviceAccounts.approve": import("./define.js").OperationEntry<BusinessRef & {
|
|
90
|
+
approvalId: string;
|
|
91
|
+
body: RequestBody;
|
|
92
|
+
}, {
|
|
93
|
+
status: "ACTIVE";
|
|
94
|
+
operation: "CREATE";
|
|
95
|
+
serviceAccountId: string;
|
|
96
|
+
apiKeyId: string;
|
|
97
|
+
plaintext: string;
|
|
98
|
+
grantedPermissions: string[];
|
|
99
|
+
} | {
|
|
100
|
+
status: "ACTIVE";
|
|
101
|
+
operation: "UPDATE";
|
|
102
|
+
serviceAccountId: string;
|
|
103
|
+
grantedPermissions: string[];
|
|
104
|
+
}, {
|
|
105
|
+
status: "ACTIVE";
|
|
106
|
+
operation: "CREATE";
|
|
107
|
+
serviceAccountId: string;
|
|
108
|
+
apiKeyId: string;
|
|
109
|
+
plaintext: string;
|
|
110
|
+
grantedPermissions: string[];
|
|
111
|
+
} | {
|
|
112
|
+
status: "ACTIVE";
|
|
113
|
+
operation: "UPDATE";
|
|
114
|
+
serviceAccountId: string;
|
|
115
|
+
grantedPermissions: string[];
|
|
116
|
+
}>;
|
|
117
|
+
"portal.serviceAccounts.deny": import("./define.js").OperationEntry<BusinessRef & {
|
|
118
|
+
approvalId: string;
|
|
119
|
+
}, {
|
|
120
|
+
status: "DENIED";
|
|
121
|
+
}, {
|
|
122
|
+
status: "DENIED";
|
|
123
|
+
}>;
|
|
124
|
+
"portal.serviceAccounts.rotate": import("./define.js").OperationEntry<BusinessRef & {
|
|
125
|
+
serviceAccountId: string;
|
|
126
|
+
}, {
|
|
127
|
+
status: "ACTIVE";
|
|
128
|
+
serviceAccountId: string;
|
|
129
|
+
revokedKeyId: string;
|
|
130
|
+
apiKeyId: string;
|
|
131
|
+
plaintext: string;
|
|
132
|
+
grantedPermissions: string[];
|
|
133
|
+
}, {
|
|
134
|
+
status: "ACTIVE";
|
|
135
|
+
serviceAccountId: string;
|
|
136
|
+
revokedKeyId: string;
|
|
137
|
+
apiKeyId: string;
|
|
138
|
+
plaintext: string;
|
|
139
|
+
grantedPermissions: string[];
|
|
140
|
+
}>;
|
|
141
|
+
"portal.serviceAccounts.revoke": import("./define.js").OperationEntry<BusinessRef & {
|
|
142
|
+
serviceAccountId: string;
|
|
143
|
+
}, void, void>;
|
|
144
|
+
"portal.usageLimits.list": import("./define.js").OperationEntry<BusinessRef & Page, {
|
|
145
|
+
data: import("../generated/schemas.js").components["schemas"]["PortalUsageLimitDto"][];
|
|
146
|
+
pagination: import("../generated/schemas.js").components["schemas"]["PortalOffsetPagination"];
|
|
147
|
+
}, {
|
|
148
|
+
data: import("../generated/schemas.js").components["schemas"]["PortalUsageLimitDto"][];
|
|
149
|
+
pagination: import("../generated/schemas.js").components["schemas"]["PortalOffsetPagination"];
|
|
150
|
+
}>;
|
|
151
|
+
"portal.usageLimits.set": import("./define.js").OperationEntry<BusinessRef & {
|
|
152
|
+
/** Update this limit; omit to create one. */
|
|
153
|
+
limitId?: string;
|
|
154
|
+
body: RequestBody;
|
|
155
|
+
}, {
|
|
156
|
+
id: string;
|
|
157
|
+
quantity: string;
|
|
158
|
+
quantityDisplayKey: string;
|
|
159
|
+
quantityLabel: string;
|
|
160
|
+
mode: "BLOCK" | "NOTIFY";
|
|
161
|
+
period: "BILLING_PERIOD";
|
|
162
|
+
notifyAtPct?: number;
|
|
163
|
+
ceiling: {
|
|
164
|
+
limitUnits?: number;
|
|
165
|
+
limitCents?: number;
|
|
166
|
+
};
|
|
167
|
+
effectiveWindow?: {
|
|
168
|
+
strategy: "fixed_window" | "sliding_window";
|
|
169
|
+
periodSeconds: number;
|
|
170
|
+
};
|
|
171
|
+
createdBy: string | null;
|
|
172
|
+
createdAt: string;
|
|
173
|
+
updatedAt: string;
|
|
174
|
+
scope: "ORG";
|
|
175
|
+
subjectId?: never;
|
|
176
|
+
limitUnits: number;
|
|
177
|
+
limitCents?: never;
|
|
178
|
+
} | {
|
|
179
|
+
id: string;
|
|
180
|
+
quantity: string;
|
|
181
|
+
quantityDisplayKey: string;
|
|
182
|
+
quantityLabel: string;
|
|
183
|
+
mode: "BLOCK" | "NOTIFY";
|
|
184
|
+
period: "BILLING_PERIOD";
|
|
185
|
+
notifyAtPct?: number;
|
|
186
|
+
ceiling: {
|
|
187
|
+
limitUnits?: number;
|
|
188
|
+
limitCents?: number;
|
|
189
|
+
};
|
|
190
|
+
effectiveWindow?: {
|
|
191
|
+
strategy: "fixed_window" | "sliding_window";
|
|
192
|
+
periodSeconds: number;
|
|
193
|
+
};
|
|
194
|
+
createdBy: string | null;
|
|
195
|
+
createdAt: string;
|
|
196
|
+
updatedAt: string;
|
|
197
|
+
scope: "ORG";
|
|
198
|
+
subjectId?: never;
|
|
199
|
+
limitUnits?: never;
|
|
200
|
+
limitCents: number;
|
|
201
|
+
} | {
|
|
202
|
+
id: string;
|
|
203
|
+
quantity: string;
|
|
204
|
+
quantityDisplayKey: string;
|
|
205
|
+
quantityLabel: string;
|
|
206
|
+
mode: "BLOCK" | "NOTIFY";
|
|
207
|
+
period: "BILLING_PERIOD";
|
|
208
|
+
notifyAtPct?: number;
|
|
209
|
+
ceiling: {
|
|
210
|
+
limitUnits?: number;
|
|
211
|
+
limitCents?: number;
|
|
212
|
+
};
|
|
213
|
+
effectiveWindow?: {
|
|
214
|
+
strategy: "fixed_window" | "sliding_window";
|
|
215
|
+
periodSeconds: number;
|
|
216
|
+
};
|
|
217
|
+
createdBy: string | null;
|
|
218
|
+
createdAt: string;
|
|
219
|
+
updatedAt: string;
|
|
220
|
+
scope: "MEMBER";
|
|
221
|
+
subjectId: string;
|
|
222
|
+
limitUnits: number;
|
|
223
|
+
limitCents?: never;
|
|
224
|
+
} | {
|
|
225
|
+
id: string;
|
|
226
|
+
quantity: string;
|
|
227
|
+
quantityDisplayKey: string;
|
|
228
|
+
quantityLabel: string;
|
|
229
|
+
mode: "BLOCK" | "NOTIFY";
|
|
230
|
+
period: "BILLING_PERIOD";
|
|
231
|
+
notifyAtPct?: number;
|
|
232
|
+
ceiling: {
|
|
233
|
+
limitUnits?: number;
|
|
234
|
+
limitCents?: number;
|
|
235
|
+
};
|
|
236
|
+
effectiveWindow?: {
|
|
237
|
+
strategy: "fixed_window" | "sliding_window";
|
|
238
|
+
periodSeconds: number;
|
|
239
|
+
};
|
|
240
|
+
createdBy: string | null;
|
|
241
|
+
createdAt: string;
|
|
242
|
+
updatedAt: string;
|
|
243
|
+
scope: "MEMBER";
|
|
244
|
+
subjectId: string;
|
|
245
|
+
limitUnits?: never;
|
|
246
|
+
limitCents: number;
|
|
247
|
+
} | {
|
|
248
|
+
id: string;
|
|
249
|
+
quantity: string;
|
|
250
|
+
quantityDisplayKey: string;
|
|
251
|
+
quantityLabel: string;
|
|
252
|
+
mode: "BLOCK" | "NOTIFY";
|
|
253
|
+
period: "BILLING_PERIOD";
|
|
254
|
+
notifyAtPct?: number;
|
|
255
|
+
ceiling: {
|
|
256
|
+
limitUnits?: number;
|
|
257
|
+
limitCents?: number;
|
|
258
|
+
};
|
|
259
|
+
effectiveWindow?: {
|
|
260
|
+
strategy: "fixed_window" | "sliding_window";
|
|
261
|
+
periodSeconds: number;
|
|
262
|
+
};
|
|
263
|
+
createdBy: string | null;
|
|
264
|
+
createdAt: string;
|
|
265
|
+
updatedAt: string;
|
|
266
|
+
scope: "SERVICE_ACCOUNT";
|
|
267
|
+
subjectId: string;
|
|
268
|
+
limitUnits: number;
|
|
269
|
+
limitCents?: never;
|
|
270
|
+
} | {
|
|
271
|
+
id: string;
|
|
272
|
+
quantity: string;
|
|
273
|
+
quantityDisplayKey: string;
|
|
274
|
+
quantityLabel: string;
|
|
275
|
+
mode: "BLOCK" | "NOTIFY";
|
|
276
|
+
period: "BILLING_PERIOD";
|
|
277
|
+
notifyAtPct?: number;
|
|
278
|
+
ceiling: {
|
|
279
|
+
limitUnits?: number;
|
|
280
|
+
limitCents?: number;
|
|
281
|
+
};
|
|
282
|
+
effectiveWindow?: {
|
|
283
|
+
strategy: "fixed_window" | "sliding_window";
|
|
284
|
+
periodSeconds: number;
|
|
285
|
+
};
|
|
286
|
+
createdBy: string | null;
|
|
287
|
+
createdAt: string;
|
|
288
|
+
updatedAt: string;
|
|
289
|
+
scope: "SERVICE_ACCOUNT";
|
|
290
|
+
subjectId: string;
|
|
291
|
+
limitUnits?: never;
|
|
292
|
+
limitCents: number;
|
|
293
|
+
}, {
|
|
294
|
+
id: string;
|
|
295
|
+
quantity: string;
|
|
296
|
+
quantityDisplayKey: string;
|
|
297
|
+
quantityLabel: string;
|
|
298
|
+
mode: "BLOCK" | "NOTIFY";
|
|
299
|
+
period: "BILLING_PERIOD";
|
|
300
|
+
notifyAtPct?: number;
|
|
301
|
+
ceiling: {
|
|
302
|
+
limitUnits?: number;
|
|
303
|
+
limitCents?: number;
|
|
304
|
+
};
|
|
305
|
+
effectiveWindow?: {
|
|
306
|
+
strategy: "fixed_window" | "sliding_window";
|
|
307
|
+
periodSeconds: number;
|
|
308
|
+
};
|
|
309
|
+
createdBy: string | null;
|
|
310
|
+
createdAt: string;
|
|
311
|
+
updatedAt: string;
|
|
312
|
+
scope: "ORG";
|
|
313
|
+
subjectId?: never;
|
|
314
|
+
limitUnits: number;
|
|
315
|
+
limitCents?: never;
|
|
316
|
+
} | {
|
|
317
|
+
id: string;
|
|
318
|
+
quantity: string;
|
|
319
|
+
quantityDisplayKey: string;
|
|
320
|
+
quantityLabel: string;
|
|
321
|
+
mode: "BLOCK" | "NOTIFY";
|
|
322
|
+
period: "BILLING_PERIOD";
|
|
323
|
+
notifyAtPct?: number;
|
|
324
|
+
ceiling: {
|
|
325
|
+
limitUnits?: number;
|
|
326
|
+
limitCents?: number;
|
|
327
|
+
};
|
|
328
|
+
effectiveWindow?: {
|
|
329
|
+
strategy: "fixed_window" | "sliding_window";
|
|
330
|
+
periodSeconds: number;
|
|
331
|
+
};
|
|
332
|
+
createdBy: string | null;
|
|
333
|
+
createdAt: string;
|
|
334
|
+
updatedAt: string;
|
|
335
|
+
scope: "ORG";
|
|
336
|
+
subjectId?: never;
|
|
337
|
+
limitUnits?: never;
|
|
338
|
+
limitCents: number;
|
|
339
|
+
} | {
|
|
340
|
+
id: string;
|
|
341
|
+
quantity: string;
|
|
342
|
+
quantityDisplayKey: string;
|
|
343
|
+
quantityLabel: string;
|
|
344
|
+
mode: "BLOCK" | "NOTIFY";
|
|
345
|
+
period: "BILLING_PERIOD";
|
|
346
|
+
notifyAtPct?: number;
|
|
347
|
+
ceiling: {
|
|
348
|
+
limitUnits?: number;
|
|
349
|
+
limitCents?: number;
|
|
350
|
+
};
|
|
351
|
+
effectiveWindow?: {
|
|
352
|
+
strategy: "fixed_window" | "sliding_window";
|
|
353
|
+
periodSeconds: number;
|
|
354
|
+
};
|
|
355
|
+
createdBy: string | null;
|
|
356
|
+
createdAt: string;
|
|
357
|
+
updatedAt: string;
|
|
358
|
+
scope: "MEMBER";
|
|
359
|
+
subjectId: string;
|
|
360
|
+
limitUnits: number;
|
|
361
|
+
limitCents?: never;
|
|
362
|
+
} | {
|
|
363
|
+
id: string;
|
|
364
|
+
quantity: string;
|
|
365
|
+
quantityDisplayKey: string;
|
|
366
|
+
quantityLabel: string;
|
|
367
|
+
mode: "BLOCK" | "NOTIFY";
|
|
368
|
+
period: "BILLING_PERIOD";
|
|
369
|
+
notifyAtPct?: number;
|
|
370
|
+
ceiling: {
|
|
371
|
+
limitUnits?: number;
|
|
372
|
+
limitCents?: number;
|
|
373
|
+
};
|
|
374
|
+
effectiveWindow?: {
|
|
375
|
+
strategy: "fixed_window" | "sliding_window";
|
|
376
|
+
periodSeconds: number;
|
|
377
|
+
};
|
|
378
|
+
createdBy: string | null;
|
|
379
|
+
createdAt: string;
|
|
380
|
+
updatedAt: string;
|
|
381
|
+
scope: "MEMBER";
|
|
382
|
+
subjectId: string;
|
|
383
|
+
limitUnits?: never;
|
|
384
|
+
limitCents: number;
|
|
385
|
+
} | {
|
|
386
|
+
id: string;
|
|
387
|
+
quantity: string;
|
|
388
|
+
quantityDisplayKey: string;
|
|
389
|
+
quantityLabel: string;
|
|
390
|
+
mode: "BLOCK" | "NOTIFY";
|
|
391
|
+
period: "BILLING_PERIOD";
|
|
392
|
+
notifyAtPct?: number;
|
|
393
|
+
ceiling: {
|
|
394
|
+
limitUnits?: number;
|
|
395
|
+
limitCents?: number;
|
|
396
|
+
};
|
|
397
|
+
effectiveWindow?: {
|
|
398
|
+
strategy: "fixed_window" | "sliding_window";
|
|
399
|
+
periodSeconds: number;
|
|
400
|
+
};
|
|
401
|
+
createdBy: string | null;
|
|
402
|
+
createdAt: string;
|
|
403
|
+
updatedAt: string;
|
|
404
|
+
scope: "SERVICE_ACCOUNT";
|
|
405
|
+
subjectId: string;
|
|
406
|
+
limitUnits: number;
|
|
407
|
+
limitCents?: never;
|
|
408
|
+
} | {
|
|
409
|
+
id: string;
|
|
410
|
+
quantity: string;
|
|
411
|
+
quantityDisplayKey: string;
|
|
412
|
+
quantityLabel: string;
|
|
413
|
+
mode: "BLOCK" | "NOTIFY";
|
|
414
|
+
period: "BILLING_PERIOD";
|
|
415
|
+
notifyAtPct?: number;
|
|
416
|
+
ceiling: {
|
|
417
|
+
limitUnits?: number;
|
|
418
|
+
limitCents?: number;
|
|
419
|
+
};
|
|
420
|
+
effectiveWindow?: {
|
|
421
|
+
strategy: "fixed_window" | "sliding_window";
|
|
422
|
+
periodSeconds: number;
|
|
423
|
+
};
|
|
424
|
+
createdBy: string | null;
|
|
425
|
+
createdAt: string;
|
|
426
|
+
updatedAt: string;
|
|
427
|
+
scope: "SERVICE_ACCOUNT";
|
|
428
|
+
subjectId: string;
|
|
429
|
+
limitUnits?: never;
|
|
430
|
+
limitCents: number;
|
|
431
|
+
}>;
|
|
432
|
+
"portal.usageLimits.remove": import("./define.js").OperationEntry<BusinessRef & {
|
|
433
|
+
limitId: string;
|
|
434
|
+
}, {
|
|
435
|
+
id: string;
|
|
436
|
+
deleted: true;
|
|
437
|
+
}, {
|
|
438
|
+
id: string;
|
|
439
|
+
deleted: true;
|
|
440
|
+
}>;
|
|
441
|
+
};
|
|
442
|
+
export {};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { CreatePromoCodeInput, PromoCodeStatus } from "../types.js";
|
|
2
|
+
type BusinessRef = {
|
|
3
|
+
businessId: string;
|
|
4
|
+
};
|
|
5
|
+
type PromoCodeRef = BusinessRef & {
|
|
6
|
+
promoCodeId: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const promoCodeOperations: {
|
|
9
|
+
"promoCodes.read": import("./define.js").OperationEntry<BusinessRef, {
|
|
10
|
+
id: string;
|
|
11
|
+
code: string;
|
|
12
|
+
kind: ("percent_off" | "amount_off" | "free_months") | null;
|
|
13
|
+
amount: number | null;
|
|
14
|
+
durationMonths: number | null;
|
|
15
|
+
applicablePlanIds: string[];
|
|
16
|
+
maxRedemptions: number | null;
|
|
17
|
+
redemptionCount: number;
|
|
18
|
+
activeUntil: string | null;
|
|
19
|
+
status: "ACTIVE" | "ARCHIVED";
|
|
20
|
+
createdAt: string;
|
|
21
|
+
}[], {
|
|
22
|
+
id: string;
|
|
23
|
+
code: string;
|
|
24
|
+
kind: ("percent_off" | "amount_off" | "free_months") | null;
|
|
25
|
+
amount: number | null;
|
|
26
|
+
durationMonths: number | null;
|
|
27
|
+
applicablePlanIds: string[];
|
|
28
|
+
maxRedemptions: number | null;
|
|
29
|
+
redemptionCount: number;
|
|
30
|
+
activeUntil: string | null;
|
|
31
|
+
status: "ACTIVE" | "ARCHIVED";
|
|
32
|
+
createdAt: string;
|
|
33
|
+
}[]>;
|
|
34
|
+
"promoCodes.create": import("./define.js").OperationEntry<BusinessRef & CreatePromoCodeInput, {
|
|
35
|
+
id: string;
|
|
36
|
+
code: string;
|
|
37
|
+
kind: ("percent_off" | "amount_off" | "free_months") | null;
|
|
38
|
+
amount: number | null;
|
|
39
|
+
durationMonths: number | null;
|
|
40
|
+
applicablePlanIds: string[];
|
|
41
|
+
maxRedemptions: number | null;
|
|
42
|
+
redemptionCount: number;
|
|
43
|
+
activeUntil: string | null;
|
|
44
|
+
status: "ACTIVE" | "ARCHIVED";
|
|
45
|
+
createdAt: string;
|
|
46
|
+
}, {
|
|
47
|
+
id: string;
|
|
48
|
+
code: string;
|
|
49
|
+
kind: ("percent_off" | "amount_off" | "free_months") | null;
|
|
50
|
+
amount: number | null;
|
|
51
|
+
durationMonths: number | null;
|
|
52
|
+
applicablePlanIds: string[];
|
|
53
|
+
maxRedemptions: number | null;
|
|
54
|
+
redemptionCount: number;
|
|
55
|
+
activeUntil: string | null;
|
|
56
|
+
status: "ACTIVE" | "ARCHIVED";
|
|
57
|
+
createdAt: string;
|
|
58
|
+
}>;
|
|
59
|
+
"promoCodes.update": import("./define.js").OperationEntry<BusinessRef & {
|
|
60
|
+
promoCodeId: string;
|
|
61
|
+
} & Partial<CreatePromoCodeInput> & {
|
|
62
|
+
status?: PromoCodeStatus;
|
|
63
|
+
}, {
|
|
64
|
+
id: string;
|
|
65
|
+
code: string;
|
|
66
|
+
kind: ("percent_off" | "amount_off" | "free_months") | null;
|
|
67
|
+
amount: number | null;
|
|
68
|
+
durationMonths: number | null;
|
|
69
|
+
applicablePlanIds: string[];
|
|
70
|
+
maxRedemptions: number | null;
|
|
71
|
+
redemptionCount: number;
|
|
72
|
+
activeUntil: string | null;
|
|
73
|
+
status: "ACTIVE" | "ARCHIVED";
|
|
74
|
+
createdAt: string;
|
|
75
|
+
}, {
|
|
76
|
+
id: string;
|
|
77
|
+
code: string;
|
|
78
|
+
kind: ("percent_off" | "amount_off" | "free_months") | null;
|
|
79
|
+
amount: number | null;
|
|
80
|
+
durationMonths: number | null;
|
|
81
|
+
applicablePlanIds: string[];
|
|
82
|
+
maxRedemptions: number | null;
|
|
83
|
+
redemptionCount: number;
|
|
84
|
+
activeUntil: string | null;
|
|
85
|
+
status: "ACTIVE" | "ARCHIVED";
|
|
86
|
+
createdAt: string;
|
|
87
|
+
}>;
|
|
88
|
+
"promoCodes.archive": import("./define.js").OperationEntry<PromoCodeRef, {
|
|
89
|
+
id: string;
|
|
90
|
+
code: string;
|
|
91
|
+
kind: ("percent_off" | "amount_off" | "free_months") | null;
|
|
92
|
+
amount: number | null;
|
|
93
|
+
durationMonths: number | null;
|
|
94
|
+
applicablePlanIds: string[];
|
|
95
|
+
maxRedemptions: number | null;
|
|
96
|
+
redemptionCount: number;
|
|
97
|
+
activeUntil: string | null;
|
|
98
|
+
status: "ACTIVE" | "ARCHIVED";
|
|
99
|
+
createdAt: string;
|
|
100
|
+
}, {
|
|
101
|
+
id: string;
|
|
102
|
+
code: string;
|
|
103
|
+
kind: ("percent_off" | "amount_off" | "free_months") | null;
|
|
104
|
+
amount: number | null;
|
|
105
|
+
durationMonths: number | null;
|
|
106
|
+
applicablePlanIds: string[];
|
|
107
|
+
maxRedemptions: number | null;
|
|
108
|
+
redemptionCount: number;
|
|
109
|
+
activeUntil: string | null;
|
|
110
|
+
status: "ACTIVE" | "ARCHIVED";
|
|
111
|
+
createdAt: string;
|
|
112
|
+
}>;
|
|
113
|
+
"promoCodes.reactivate": import("./define.js").OperationEntry<PromoCodeRef, {
|
|
114
|
+
id: string;
|
|
115
|
+
code: string;
|
|
116
|
+
kind: ("percent_off" | "amount_off" | "free_months") | null;
|
|
117
|
+
amount: number | null;
|
|
118
|
+
durationMonths: number | null;
|
|
119
|
+
applicablePlanIds: string[];
|
|
120
|
+
maxRedemptions: number | null;
|
|
121
|
+
redemptionCount: number;
|
|
122
|
+
activeUntil: string | null;
|
|
123
|
+
status: "ACTIVE" | "ARCHIVED";
|
|
124
|
+
createdAt: string;
|
|
125
|
+
}, {
|
|
126
|
+
id: string;
|
|
127
|
+
code: string;
|
|
128
|
+
kind: ("percent_off" | "amount_off" | "free_months") | null;
|
|
129
|
+
amount: number | null;
|
|
130
|
+
durationMonths: number | null;
|
|
131
|
+
applicablePlanIds: string[];
|
|
132
|
+
maxRedemptions: number | null;
|
|
133
|
+
redemptionCount: number;
|
|
134
|
+
activeUntil: string | null;
|
|
135
|
+
status: "ACTIVE" | "ARCHIVED";
|
|
136
|
+
createdAt: string;
|
|
137
|
+
}>;
|
|
138
|
+
};
|
|
139
|
+
export {};
|