@moonbase.sh/api 0.4.32 → 0.4.33
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 +230 -193
- package/dist/index.d.cts +1969 -107
- package/dist/index.d.ts +1969 -107
- package/dist/index.js +230 -193
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,47 +1,116 @@
|
|
|
1
1
|
// src/activationRequests/schemas.ts
|
|
2
|
-
import { z as
|
|
2
|
+
import { z as z6 } from "zod";
|
|
3
3
|
|
|
4
4
|
// src/licenses/schemas.ts
|
|
5
|
-
import { z as
|
|
5
|
+
import { z as z3 } from "zod";
|
|
6
6
|
|
|
7
7
|
// src/customers/schemas.ts
|
|
8
|
+
import { z as z2 } from "zod";
|
|
9
|
+
|
|
10
|
+
// src/globalSchemas.ts
|
|
8
11
|
import { z } from "zod";
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
var userSchema = z.object({
|
|
13
|
+
id: z.string(),
|
|
14
|
+
name: z.string(),
|
|
15
|
+
email: z.string()
|
|
16
|
+
});
|
|
17
|
+
var entityChangeSchema = z.object({
|
|
18
|
+
at: z.coerce.date(),
|
|
19
|
+
by: userSchema
|
|
20
|
+
});
|
|
21
|
+
var moneySchema = z.object({
|
|
22
|
+
currency: z.string(),
|
|
23
|
+
amount: z.number()
|
|
24
|
+
});
|
|
25
|
+
var priceCollectionSchema = z.record(z.number());
|
|
26
|
+
var percentageOffDiscountSchema = z.object({
|
|
27
|
+
type: z.literal("PercentageOffDiscount"),
|
|
28
|
+
percentage: z.number()
|
|
29
|
+
});
|
|
30
|
+
var flatAmountOffDiscountSchema = z.object({
|
|
31
|
+
type: z.literal("FlatAmountOffDiscount"),
|
|
32
|
+
total: priceCollectionSchema
|
|
20
33
|
});
|
|
21
|
-
var
|
|
34
|
+
var discountSchema = z.discriminatedUnion("type", [
|
|
35
|
+
percentageOffDiscountSchema,
|
|
36
|
+
flatAmountOffDiscountSchema
|
|
37
|
+
]);
|
|
38
|
+
var dateTimeSpanSchema = z.object({
|
|
39
|
+
from: z.coerce.date().nullable(),
|
|
40
|
+
to: z.coerce.date().nullable()
|
|
41
|
+
});
|
|
42
|
+
var pricingDiscountSchema = z.object({
|
|
43
|
+
name: z.string(),
|
|
44
|
+
description: z.string().nullable(),
|
|
45
|
+
discount: discountSchema,
|
|
46
|
+
applicableVariationIds: z.string().array().nullable(),
|
|
47
|
+
validity: dateTimeSpanSchema.nullable()
|
|
48
|
+
});
|
|
49
|
+
var pricingVariationSchema = z.object({
|
|
22
50
|
id: z.string(),
|
|
23
|
-
externalId: z.string().optional(),
|
|
24
51
|
name: z.string(),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
52
|
+
price: priceCollectionSchema
|
|
53
|
+
});
|
|
54
|
+
function paged(itemSchema, api) {
|
|
55
|
+
return z.object({
|
|
56
|
+
items: z.array(itemSchema),
|
|
57
|
+
hasMore: z.boolean(),
|
|
58
|
+
next: z.string().nullable()
|
|
59
|
+
}).transform((page) => ({
|
|
60
|
+
...page,
|
|
61
|
+
getNext: () => {
|
|
62
|
+
if (!page.hasMore || !page.next)
|
|
63
|
+
throw new Error("Response indicates no more results");
|
|
64
|
+
return api.fetch(page.next).then((response) => paged(itemSchema, api).parse(response.data));
|
|
65
|
+
}
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
function quantifiable(itemSchema) {
|
|
69
|
+
return z.object({
|
|
70
|
+
value: itemSchema,
|
|
71
|
+
quantity: z.number()
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// src/customers/schemas.ts
|
|
76
|
+
var addressSchema = z2.object({
|
|
77
|
+
countryCode: z2.string(),
|
|
78
|
+
streetAddress1: z2.string(),
|
|
79
|
+
streetAddress2: z2.string().nullable(),
|
|
80
|
+
locality: z2.string().nullable(),
|
|
81
|
+
region: z2.string().nullable(),
|
|
82
|
+
postCode: z2.string().nullable()
|
|
83
|
+
});
|
|
84
|
+
var communicationPreferencesSchema = z2.object({
|
|
85
|
+
newsletterOptIn: z2.boolean()
|
|
86
|
+
// productUpdatesOptIn: z.boolean(), // TODO: Enable when relevant
|
|
87
|
+
});
|
|
88
|
+
var customerSchema = z2.object({
|
|
89
|
+
id: z2.string(),
|
|
90
|
+
externalId: z2.string().optional(),
|
|
91
|
+
name: z2.string(),
|
|
92
|
+
businessName: z2.string().nullable(),
|
|
93
|
+
taxId: z2.string().nullable(),
|
|
94
|
+
email: z2.string(),
|
|
95
|
+
numberOfLicenses: z2.number(),
|
|
96
|
+
numberOfTrials: z2.number(),
|
|
97
|
+
emailConfirmed: z2.boolean(),
|
|
98
|
+
hasPassword: z2.boolean(),
|
|
99
|
+
isDeleted: z2.boolean(),
|
|
100
|
+
ownedProducts: z2.string().array().transform((arr) => arr.sort()),
|
|
101
|
+
subscribedProducts: z2.string().array().transform((arr) => arr.sort()),
|
|
35
102
|
address: addressSchema.nullable(),
|
|
36
|
-
communicationPreferences: communicationPreferencesSchema
|
|
103
|
+
communicationPreferences: communicationPreferencesSchema,
|
|
104
|
+
lastUpdated: entityChangeSchema,
|
|
105
|
+
created: entityChangeSchema
|
|
37
106
|
});
|
|
38
|
-
var importCustomerRequestSchema =
|
|
39
|
-
name:
|
|
40
|
-
email:
|
|
41
|
-
externalId:
|
|
42
|
-
password:
|
|
107
|
+
var importCustomerRequestSchema = z2.object({
|
|
108
|
+
name: z2.string(),
|
|
109
|
+
email: z2.string(),
|
|
110
|
+
externalId: z2.string().optional(),
|
|
111
|
+
password: z2.string().optional(),
|
|
43
112
|
address: addressSchema.optional(),
|
|
44
|
-
createdAt:
|
|
113
|
+
createdAt: z2.date().optional()
|
|
45
114
|
});
|
|
46
115
|
|
|
47
116
|
// src/licenses/models.ts
|
|
@@ -63,61 +132,86 @@ var ActivationMethod = /* @__PURE__ */ ((ActivationMethod2) => {
|
|
|
63
132
|
})(ActivationMethod || {});
|
|
64
133
|
|
|
65
134
|
// src/licenses/schemas.ts
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
135
|
+
var licenseSourceSchema = z3.discriminatedUnion("type", [
|
|
136
|
+
z3.object({
|
|
137
|
+
type: z3.literal("Order"),
|
|
138
|
+
orderId: z3.string()
|
|
139
|
+
}),
|
|
140
|
+
z3.object({
|
|
141
|
+
type: z3.literal("Subscription"),
|
|
142
|
+
subscriptionId: z3.string()
|
|
143
|
+
}),
|
|
144
|
+
z3.object({
|
|
145
|
+
type: z3.literal("Voucher"),
|
|
146
|
+
voucherId: z3.string(),
|
|
147
|
+
code: z3.string()
|
|
148
|
+
}),
|
|
149
|
+
z3.object({
|
|
150
|
+
type: z3.literal("Fastspring"),
|
|
151
|
+
reference: z3.string(),
|
|
152
|
+
testMode: z3.boolean()
|
|
153
|
+
})
|
|
154
|
+
]);
|
|
155
|
+
var licenseSchema = z3.object({
|
|
156
|
+
id: z3.string(),
|
|
157
|
+
externalId: z3.string().optional(),
|
|
158
|
+
productId: z3.string(),
|
|
159
|
+
ownerId: z3.string(),
|
|
160
|
+
status: z3.nativeEnum(LicenseStatus),
|
|
161
|
+
activeNumberOfActivations: z3.number(),
|
|
162
|
+
maxNumberOfActivations: z3.number(),
|
|
163
|
+
offlineActivationsAllowed: z3.boolean(),
|
|
164
|
+
source: licenseSourceSchema.nullable(),
|
|
165
|
+
lastUpdated: entityChangeSchema,
|
|
166
|
+
created: entityChangeSchema
|
|
167
|
+
});
|
|
168
|
+
var licenseActivationSchema = z3.object({
|
|
169
|
+
id: z3.string(),
|
|
170
|
+
name: z3.string(),
|
|
171
|
+
signature: z3.string(),
|
|
172
|
+
status: z3.nativeEnum(ActivationStatus),
|
|
173
|
+
activationMethod: z3.nativeEnum(ActivationMethod),
|
|
174
|
+
lastValidatedAt: z3.coerce.date(),
|
|
83
175
|
license: licenseSchema,
|
|
84
|
-
customer: customerSchema.optional()
|
|
176
|
+
customer: customerSchema.optional(),
|
|
177
|
+
lastUpdated: entityChangeSchema,
|
|
178
|
+
created: entityChangeSchema
|
|
85
179
|
});
|
|
86
|
-
var importLicenseRequestSchema =
|
|
87
|
-
ownerId:
|
|
88
|
-
productId:
|
|
89
|
-
externalId:
|
|
90
|
-
createdAt:
|
|
91
|
-
maxNumberOfActivations:
|
|
92
|
-
offlineActivationsAllowed:
|
|
93
|
-
activations:
|
|
94
|
-
activationMethod:
|
|
95
|
-
deviceName:
|
|
96
|
-
deviceSignature:
|
|
97
|
-
lastValidation:
|
|
180
|
+
var importLicenseRequestSchema = z3.object({
|
|
181
|
+
ownerId: z3.string(),
|
|
182
|
+
productId: z3.string(),
|
|
183
|
+
externalId: z3.string().optional(),
|
|
184
|
+
createdAt: z3.date().optional(),
|
|
185
|
+
maxNumberOfActivations: z3.number().optional(),
|
|
186
|
+
offlineActivationsAllowed: z3.boolean().optional(),
|
|
187
|
+
activations: z3.object({
|
|
188
|
+
activationMethod: z3.nativeEnum(ActivationMethod),
|
|
189
|
+
deviceName: z3.string(),
|
|
190
|
+
deviceSignature: z3.string(),
|
|
191
|
+
lastValidation: z3.date().optional()
|
|
98
192
|
}).array().optional()
|
|
99
193
|
});
|
|
100
|
-
var provisionLicensesRequestRequestSchema =
|
|
101
|
-
productId:
|
|
102
|
-
quantity:
|
|
103
|
-
limitPerCustomer:
|
|
194
|
+
var provisionLicensesRequestRequestSchema = z3.object({
|
|
195
|
+
productId: z3.string(),
|
|
196
|
+
quantity: z3.number().optional(),
|
|
197
|
+
limitPerCustomer: z3.number().optional()
|
|
104
198
|
}).array();
|
|
105
|
-
var provisionLicensesRequestSchema =
|
|
106
|
-
|
|
107
|
-
ownerId:
|
|
199
|
+
var provisionLicensesRequestSchema = z3.union([
|
|
200
|
+
z3.object({
|
|
201
|
+
ownerId: z3.string(),
|
|
108
202
|
requests: provisionLicensesRequestRequestSchema
|
|
109
203
|
}),
|
|
110
|
-
|
|
111
|
-
customer:
|
|
112
|
-
name:
|
|
113
|
-
email:
|
|
204
|
+
z3.object({
|
|
205
|
+
customer: z3.object({
|
|
206
|
+
name: z3.string(),
|
|
207
|
+
email: z3.string()
|
|
114
208
|
}),
|
|
115
209
|
requests: provisionLicensesRequestRequestSchema
|
|
116
210
|
})
|
|
117
211
|
]);
|
|
118
212
|
|
|
119
213
|
// src/products/schemas.ts
|
|
120
|
-
import { z as
|
|
214
|
+
import { z as z4 } from "zod";
|
|
121
215
|
|
|
122
216
|
// src/products/models.ts
|
|
123
217
|
var Platform = /* @__PURE__ */ ((Platform2) => {
|
|
@@ -136,36 +230,36 @@ var ProductStatus = /* @__PURE__ */ ((ProductStatus2) => {
|
|
|
136
230
|
})(ProductStatus || {});
|
|
137
231
|
|
|
138
232
|
// src/products/schemas.ts
|
|
139
|
-
var productSchema =
|
|
140
|
-
id:
|
|
141
|
-
name:
|
|
142
|
-
tagline:
|
|
143
|
-
description:
|
|
144
|
-
website:
|
|
145
|
-
iconUrl:
|
|
146
|
-
status:
|
|
147
|
-
purchasable:
|
|
148
|
-
currentReleaseVersion:
|
|
149
|
-
});
|
|
150
|
-
var productReleaseSchema =
|
|
151
|
-
version:
|
|
152
|
-
description:
|
|
153
|
-
publishedAt:
|
|
154
|
-
downloadUrl:
|
|
155
|
-
hostedDownloadUrl:
|
|
156
|
-
downloads:
|
|
157
|
-
name:
|
|
158
|
-
key:
|
|
159
|
-
platform:
|
|
160
|
-
size:
|
|
161
|
-
downloadUrl:
|
|
162
|
-
hostedDownloadUrl:
|
|
163
|
-
directUrl:
|
|
233
|
+
var productSchema = z4.object({
|
|
234
|
+
id: z4.string(),
|
|
235
|
+
name: z4.string(),
|
|
236
|
+
tagline: z4.string(),
|
|
237
|
+
description: z4.string(),
|
|
238
|
+
website: z4.string().nullable(),
|
|
239
|
+
iconUrl: z4.string().nullable(),
|
|
240
|
+
status: z4.nativeEnum(ProductStatus),
|
|
241
|
+
purchasable: z4.boolean(),
|
|
242
|
+
currentReleaseVersion: z4.string().nullable()
|
|
243
|
+
});
|
|
244
|
+
var productReleaseSchema = z4.object({
|
|
245
|
+
version: z4.string(),
|
|
246
|
+
description: z4.string().nullable(),
|
|
247
|
+
publishedAt: z4.coerce.date().nullable(),
|
|
248
|
+
downloadUrl: z4.string(),
|
|
249
|
+
hostedDownloadUrl: z4.string(),
|
|
250
|
+
downloads: z4.object({
|
|
251
|
+
name: z4.string(),
|
|
252
|
+
key: z4.string(),
|
|
253
|
+
platform: z4.nativeEnum(Platform),
|
|
254
|
+
size: z4.number(),
|
|
255
|
+
downloadUrl: z4.string(),
|
|
256
|
+
hostedDownloadUrl: z4.string(),
|
|
257
|
+
directUrl: z4.string()
|
|
164
258
|
}).array()
|
|
165
259
|
});
|
|
166
260
|
|
|
167
261
|
// src/trials/schemas.ts
|
|
168
|
-
import { z as
|
|
262
|
+
import { z as z5 } from "zod";
|
|
169
263
|
|
|
170
264
|
// src/trials/models.ts
|
|
171
265
|
var TrialStatus = /* @__PURE__ */ ((TrialStatus2) => {
|
|
@@ -175,26 +269,28 @@ var TrialStatus = /* @__PURE__ */ ((TrialStatus2) => {
|
|
|
175
269
|
})(TrialStatus || {});
|
|
176
270
|
|
|
177
271
|
// src/trials/schemas.ts
|
|
178
|
-
var trialSchema =
|
|
179
|
-
id:
|
|
180
|
-
externalId:
|
|
181
|
-
productId:
|
|
182
|
-
deviceName:
|
|
183
|
-
deviceSignature:
|
|
184
|
-
status:
|
|
185
|
-
expiresAt:
|
|
186
|
-
lastValidatedAt:
|
|
187
|
-
customer: customerSchema.optional()
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
272
|
+
var trialSchema = z5.object({
|
|
273
|
+
id: z5.string(),
|
|
274
|
+
externalId: z5.string().optional(),
|
|
275
|
+
productId: z5.string(),
|
|
276
|
+
deviceName: z5.string(),
|
|
277
|
+
deviceSignature: z5.string(),
|
|
278
|
+
status: z5.nativeEnum(TrialStatus),
|
|
279
|
+
expiresAt: z5.coerce.date(),
|
|
280
|
+
lastValidatedAt: z5.coerce.date(),
|
|
281
|
+
customer: customerSchema.optional(),
|
|
282
|
+
lastUpdated: entityChangeSchema,
|
|
283
|
+
created: entityChangeSchema
|
|
284
|
+
});
|
|
285
|
+
var importTrialRequestSchema = z5.object({
|
|
286
|
+
productId: z5.string(),
|
|
287
|
+
externalId: z5.string().optional(),
|
|
288
|
+
deviceName: z5.string(),
|
|
289
|
+
deviceSignature: z5.string(),
|
|
290
|
+
expiresAt: z5.date(),
|
|
291
|
+
ownerId: z5.string().optional(),
|
|
292
|
+
lastValidation: z5.date().optional(),
|
|
293
|
+
createdAt: z5.date().optional()
|
|
198
294
|
});
|
|
199
295
|
|
|
200
296
|
// src/activationRequests/models.ts
|
|
@@ -206,11 +302,11 @@ var ActivationRequestStatus = /* @__PURE__ */ ((ActivationRequestStatus2) => {
|
|
|
206
302
|
})(ActivationRequestStatus || {});
|
|
207
303
|
|
|
208
304
|
// src/activationRequests/schemas.ts
|
|
209
|
-
var activationRequestSchema =
|
|
210
|
-
id:
|
|
211
|
-
deviceName:
|
|
212
|
-
deviceSignature:
|
|
213
|
-
status:
|
|
305
|
+
var activationRequestSchema = z6.object({
|
|
306
|
+
id: z6.string(),
|
|
307
|
+
deviceName: z6.string(),
|
|
308
|
+
deviceSignature: z6.string(),
|
|
309
|
+
status: z6.nativeEnum(ActivationRequestStatus),
|
|
214
310
|
product: productSchema,
|
|
215
311
|
activation: licenseActivationSchema.optional(),
|
|
216
312
|
trial: trialSchema.optional()
|
|
@@ -231,71 +327,6 @@ var ActivationRequestEndpoints = class {
|
|
|
231
327
|
}
|
|
232
328
|
};
|
|
233
329
|
|
|
234
|
-
// src/globalSchemas.ts
|
|
235
|
-
import { z as z6 } from "zod";
|
|
236
|
-
var userSchema = z6.object({
|
|
237
|
-
id: z6.string(),
|
|
238
|
-
name: z6.string(),
|
|
239
|
-
email: z6.string()
|
|
240
|
-
});
|
|
241
|
-
var entityChangeSchema = z6.object({
|
|
242
|
-
at: z6.coerce.date(),
|
|
243
|
-
by: userSchema
|
|
244
|
-
});
|
|
245
|
-
var moneySchema = z6.object({
|
|
246
|
-
currency: z6.string(),
|
|
247
|
-
amount: z6.number()
|
|
248
|
-
});
|
|
249
|
-
var priceCollectionSchema = z6.record(z6.number());
|
|
250
|
-
var percentageOffDiscountSchema = z6.object({
|
|
251
|
-
type: z6.literal("PercentageOffDiscount"),
|
|
252
|
-
percentage: z6.number()
|
|
253
|
-
});
|
|
254
|
-
var flatAmountOffDiscountSchema = z6.object({
|
|
255
|
-
type: z6.literal("FlatAmountOffDiscount"),
|
|
256
|
-
total: priceCollectionSchema
|
|
257
|
-
});
|
|
258
|
-
var discountSchema = z6.discriminatedUnion("type", [
|
|
259
|
-
percentageOffDiscountSchema,
|
|
260
|
-
flatAmountOffDiscountSchema
|
|
261
|
-
]);
|
|
262
|
-
var dateTimeSpanSchema = z6.object({
|
|
263
|
-
from: z6.coerce.date().nullable(),
|
|
264
|
-
to: z6.coerce.date().nullable()
|
|
265
|
-
});
|
|
266
|
-
var pricingDiscountSchema = z6.object({
|
|
267
|
-
name: z6.string(),
|
|
268
|
-
description: z6.string().nullable(),
|
|
269
|
-
discount: discountSchema,
|
|
270
|
-
applicableVariationIds: z6.string().array().nullable(),
|
|
271
|
-
validity: dateTimeSpanSchema.nullable()
|
|
272
|
-
});
|
|
273
|
-
var pricingVariationSchema = z6.object({
|
|
274
|
-
id: z6.string(),
|
|
275
|
-
name: z6.string(),
|
|
276
|
-
price: priceCollectionSchema
|
|
277
|
-
});
|
|
278
|
-
function paged(itemSchema, api) {
|
|
279
|
-
return z6.object({
|
|
280
|
-
items: z6.array(itemSchema),
|
|
281
|
-
hasMore: z6.boolean(),
|
|
282
|
-
next: z6.string().nullable()
|
|
283
|
-
}).transform((page) => ({
|
|
284
|
-
...page,
|
|
285
|
-
getNext: () => {
|
|
286
|
-
if (!page.hasMore || !page.next)
|
|
287
|
-
throw new Error("Response indicates no more results");
|
|
288
|
-
return api.fetch(page.next).then((response) => paged(itemSchema, api).parse(response.data));
|
|
289
|
-
}
|
|
290
|
-
}));
|
|
291
|
-
}
|
|
292
|
-
function quantifiable(itemSchema) {
|
|
293
|
-
return z6.object({
|
|
294
|
-
value: itemSchema,
|
|
295
|
-
quantity: z6.number()
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
|
|
299
330
|
// src/utils/api.ts
|
|
300
331
|
import fetch from "cross-fetch";
|
|
301
332
|
|
|
@@ -455,8 +486,12 @@ var LicenseEndpoints = class {
|
|
|
455
486
|
const response = await this.api.fetch(`/api/licenses/${licenseId}/revoke`, "POST");
|
|
456
487
|
return licenseSchema.parse(response.data);
|
|
457
488
|
}
|
|
458
|
-
async queryActivations(
|
|
459
|
-
|
|
489
|
+
async queryActivations(licenseIdOrOpt, opts) {
|
|
490
|
+
if (licenseIdOrOpt && typeof licenseIdOrOpt === "string") {
|
|
491
|
+
const response2 = await this.api.fetch(`/api/licenses/${licenseIdOrOpt}/activations?${objectToQuery(opts)}`);
|
|
492
|
+
return paged(licenseActivationSchema, this.api).parse(response2.data);
|
|
493
|
+
}
|
|
494
|
+
const response = await this.api.fetch(`/api/license-activations?${objectToQuery(opts)}`);
|
|
460
495
|
return paged(licenseActivationSchema, this.api).parse(response.data);
|
|
461
496
|
}
|
|
462
497
|
async getActivation(licenseId, activationId) {
|
|
@@ -695,7 +730,9 @@ var voucherSchema = z10.object({
|
|
|
695
730
|
numberOfCodes: z10.number(),
|
|
696
731
|
numberOfRedemptions: z10.number(),
|
|
697
732
|
redeemsProducts: quantifiable(productSchema).array(),
|
|
698
|
-
redeemsBundles: quantifiable(bundleSchema).array()
|
|
733
|
+
redeemsBundles: quantifiable(bundleSchema).array(),
|
|
734
|
+
lastUpdated: entityChangeSchema,
|
|
735
|
+
created: entityChangeSchema
|
|
699
736
|
});
|
|
700
737
|
var createVoucherRequestSchema = z10.object({
|
|
701
738
|
name: z10.string(),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.33",
|
|
5
5
|
"description": "Package to let you integrate backends with Moonbase.sh as payment and delivery provider",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|