@moonbase.sh/api 0.1.120 → 0.1.122
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 +5 -1
- package/dist/index.d.cts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -186,7 +186,7 @@ var trialSchema = import_zod4.z.object({
|
|
|
186
186
|
status: import_zod4.z.nativeEnum(TrialStatus),
|
|
187
187
|
expiresAt: import_zod4.z.coerce.date(),
|
|
188
188
|
lastValidatedAt: import_zod4.z.coerce.date(),
|
|
189
|
-
ownerId: import_zod4.z.string().
|
|
189
|
+
ownerId: import_zod4.z.string().nullable()
|
|
190
190
|
});
|
|
191
191
|
var importTrialRequestSchema = import_zod4.z.object({
|
|
192
192
|
productId: import_zod4.z.string(),
|
|
@@ -423,6 +423,10 @@ var LicenseEndpoints = class {
|
|
|
423
423
|
const response = await this.api.fetch(`/api/licenses/${licenseId}/activations?${objectToQuery(opts)}`);
|
|
424
424
|
return paged(licenseActivationSchema).parse(response.data);
|
|
425
425
|
}
|
|
426
|
+
async getActivation(licenseId, activationId) {
|
|
427
|
+
const response = await this.api.fetch(`/api/licenses/${licenseId}/activations/${activationId}`);
|
|
428
|
+
return licenseActivationSchema.parse(response.data);
|
|
429
|
+
}
|
|
426
430
|
async validateActivation(licenseId, activationId) {
|
|
427
431
|
const response = await this.api.fetch(`/api/licenses/${licenseId}/activations/${activationId}/validate`, "POST");
|
|
428
432
|
return licenseActivationSchema.parse(response.data);
|
package/dist/index.d.cts
CHANGED
|
@@ -269,27 +269,27 @@ declare const activationRequestSchema: z.ZodObject<{
|
|
|
269
269
|
status: z.ZodNativeEnum<typeof TrialStatus>;
|
|
270
270
|
expiresAt: z.ZodDate;
|
|
271
271
|
lastValidatedAt: z.ZodDate;
|
|
272
|
-
ownerId: z.
|
|
272
|
+
ownerId: z.ZodNullable<z.ZodString>;
|
|
273
273
|
}, "strip", z.ZodTypeAny, {
|
|
274
274
|
status: TrialStatus;
|
|
275
275
|
id: string;
|
|
276
276
|
productId: string;
|
|
277
|
+
ownerId: string | null;
|
|
277
278
|
lastValidatedAt: Date;
|
|
278
279
|
deviceName: string;
|
|
279
280
|
deviceSignature: string;
|
|
280
281
|
expiresAt: Date;
|
|
281
282
|
externalId?: string | undefined;
|
|
282
|
-
ownerId?: string | undefined;
|
|
283
283
|
}, {
|
|
284
284
|
status: TrialStatus;
|
|
285
285
|
id: string;
|
|
286
286
|
productId: string;
|
|
287
|
+
ownerId: string | null;
|
|
287
288
|
lastValidatedAt: Date;
|
|
288
289
|
deviceName: string;
|
|
289
290
|
deviceSignature: string;
|
|
290
291
|
expiresAt: Date;
|
|
291
292
|
externalId?: string | undefined;
|
|
292
|
-
ownerId?: string | undefined;
|
|
293
293
|
}>>;
|
|
294
294
|
customer: z.ZodOptional<z.ZodObject<{
|
|
295
295
|
id: z.ZodString;
|
|
@@ -445,12 +445,12 @@ declare const activationRequestSchema: z.ZodObject<{
|
|
|
445
445
|
status: TrialStatus;
|
|
446
446
|
id: string;
|
|
447
447
|
productId: string;
|
|
448
|
+
ownerId: string | null;
|
|
448
449
|
lastValidatedAt: Date;
|
|
449
450
|
deviceName: string;
|
|
450
451
|
deviceSignature: string;
|
|
451
452
|
expiresAt: Date;
|
|
452
453
|
externalId?: string | undefined;
|
|
453
|
-
ownerId?: string | undefined;
|
|
454
454
|
} | undefined;
|
|
455
455
|
customer?: {
|
|
456
456
|
id: string;
|
|
@@ -540,12 +540,12 @@ declare const activationRequestSchema: z.ZodObject<{
|
|
|
540
540
|
status: TrialStatus;
|
|
541
541
|
id: string;
|
|
542
542
|
productId: string;
|
|
543
|
+
ownerId: string | null;
|
|
543
544
|
lastValidatedAt: Date;
|
|
544
545
|
deviceName: string;
|
|
545
546
|
deviceSignature: string;
|
|
546
547
|
expiresAt: Date;
|
|
547
548
|
externalId?: string | undefined;
|
|
548
|
-
ownerId?: string | undefined;
|
|
549
549
|
} | undefined;
|
|
550
550
|
customer?: {
|
|
551
551
|
id: string;
|
|
@@ -1161,6 +1161,7 @@ declare class LicenseEndpoints {
|
|
|
1161
1161
|
productFilter?: string;
|
|
1162
1162
|
pageSize?: number;
|
|
1163
1163
|
}): Promise<Page<LicenseActivation>>;
|
|
1164
|
+
getActivation(licenseId: string, activationId: string): Promise<LicenseActivation>;
|
|
1164
1165
|
validateActivation(licenseId: string, activationId: string): Promise<LicenseActivation>;
|
|
1165
1166
|
revokeActivation(licenseId: string, activationId: string): Promise<LicenseActivation>;
|
|
1166
1167
|
}
|
|
@@ -1223,27 +1224,27 @@ declare const trialSchema: z.ZodObject<{
|
|
|
1223
1224
|
status: z.ZodNativeEnum<typeof TrialStatus>;
|
|
1224
1225
|
expiresAt: z.ZodDate;
|
|
1225
1226
|
lastValidatedAt: z.ZodDate;
|
|
1226
|
-
ownerId: z.
|
|
1227
|
+
ownerId: z.ZodNullable<z.ZodString>;
|
|
1227
1228
|
}, "strip", z.ZodTypeAny, {
|
|
1228
1229
|
status: TrialStatus;
|
|
1229
1230
|
id: string;
|
|
1230
1231
|
productId: string;
|
|
1232
|
+
ownerId: string | null;
|
|
1231
1233
|
lastValidatedAt: Date;
|
|
1232
1234
|
deviceName: string;
|
|
1233
1235
|
deviceSignature: string;
|
|
1234
1236
|
expiresAt: Date;
|
|
1235
1237
|
externalId?: string | undefined;
|
|
1236
|
-
ownerId?: string | undefined;
|
|
1237
1238
|
}, {
|
|
1238
1239
|
status: TrialStatus;
|
|
1239
1240
|
id: string;
|
|
1240
1241
|
productId: string;
|
|
1242
|
+
ownerId: string | null;
|
|
1241
1243
|
lastValidatedAt: Date;
|
|
1242
1244
|
deviceName: string;
|
|
1243
1245
|
deviceSignature: string;
|
|
1244
1246
|
expiresAt: Date;
|
|
1245
1247
|
externalId?: string | undefined;
|
|
1246
|
-
ownerId?: string | undefined;
|
|
1247
1248
|
}>;
|
|
1248
1249
|
declare const importTrialRequestSchema: z.ZodObject<{
|
|
1249
1250
|
productId: z.ZodString;
|
package/dist/index.d.ts
CHANGED
|
@@ -269,27 +269,27 @@ declare const activationRequestSchema: z.ZodObject<{
|
|
|
269
269
|
status: z.ZodNativeEnum<typeof TrialStatus>;
|
|
270
270
|
expiresAt: z.ZodDate;
|
|
271
271
|
lastValidatedAt: z.ZodDate;
|
|
272
|
-
ownerId: z.
|
|
272
|
+
ownerId: z.ZodNullable<z.ZodString>;
|
|
273
273
|
}, "strip", z.ZodTypeAny, {
|
|
274
274
|
status: TrialStatus;
|
|
275
275
|
id: string;
|
|
276
276
|
productId: string;
|
|
277
|
+
ownerId: string | null;
|
|
277
278
|
lastValidatedAt: Date;
|
|
278
279
|
deviceName: string;
|
|
279
280
|
deviceSignature: string;
|
|
280
281
|
expiresAt: Date;
|
|
281
282
|
externalId?: string | undefined;
|
|
282
|
-
ownerId?: string | undefined;
|
|
283
283
|
}, {
|
|
284
284
|
status: TrialStatus;
|
|
285
285
|
id: string;
|
|
286
286
|
productId: string;
|
|
287
|
+
ownerId: string | null;
|
|
287
288
|
lastValidatedAt: Date;
|
|
288
289
|
deviceName: string;
|
|
289
290
|
deviceSignature: string;
|
|
290
291
|
expiresAt: Date;
|
|
291
292
|
externalId?: string | undefined;
|
|
292
|
-
ownerId?: string | undefined;
|
|
293
293
|
}>>;
|
|
294
294
|
customer: z.ZodOptional<z.ZodObject<{
|
|
295
295
|
id: z.ZodString;
|
|
@@ -445,12 +445,12 @@ declare const activationRequestSchema: z.ZodObject<{
|
|
|
445
445
|
status: TrialStatus;
|
|
446
446
|
id: string;
|
|
447
447
|
productId: string;
|
|
448
|
+
ownerId: string | null;
|
|
448
449
|
lastValidatedAt: Date;
|
|
449
450
|
deviceName: string;
|
|
450
451
|
deviceSignature: string;
|
|
451
452
|
expiresAt: Date;
|
|
452
453
|
externalId?: string | undefined;
|
|
453
|
-
ownerId?: string | undefined;
|
|
454
454
|
} | undefined;
|
|
455
455
|
customer?: {
|
|
456
456
|
id: string;
|
|
@@ -540,12 +540,12 @@ declare const activationRequestSchema: z.ZodObject<{
|
|
|
540
540
|
status: TrialStatus;
|
|
541
541
|
id: string;
|
|
542
542
|
productId: string;
|
|
543
|
+
ownerId: string | null;
|
|
543
544
|
lastValidatedAt: Date;
|
|
544
545
|
deviceName: string;
|
|
545
546
|
deviceSignature: string;
|
|
546
547
|
expiresAt: Date;
|
|
547
548
|
externalId?: string | undefined;
|
|
548
|
-
ownerId?: string | undefined;
|
|
549
549
|
} | undefined;
|
|
550
550
|
customer?: {
|
|
551
551
|
id: string;
|
|
@@ -1161,6 +1161,7 @@ declare class LicenseEndpoints {
|
|
|
1161
1161
|
productFilter?: string;
|
|
1162
1162
|
pageSize?: number;
|
|
1163
1163
|
}): Promise<Page<LicenseActivation>>;
|
|
1164
|
+
getActivation(licenseId: string, activationId: string): Promise<LicenseActivation>;
|
|
1164
1165
|
validateActivation(licenseId: string, activationId: string): Promise<LicenseActivation>;
|
|
1165
1166
|
revokeActivation(licenseId: string, activationId: string): Promise<LicenseActivation>;
|
|
1166
1167
|
}
|
|
@@ -1223,27 +1224,27 @@ declare const trialSchema: z.ZodObject<{
|
|
|
1223
1224
|
status: z.ZodNativeEnum<typeof TrialStatus>;
|
|
1224
1225
|
expiresAt: z.ZodDate;
|
|
1225
1226
|
lastValidatedAt: z.ZodDate;
|
|
1226
|
-
ownerId: z.
|
|
1227
|
+
ownerId: z.ZodNullable<z.ZodString>;
|
|
1227
1228
|
}, "strip", z.ZodTypeAny, {
|
|
1228
1229
|
status: TrialStatus;
|
|
1229
1230
|
id: string;
|
|
1230
1231
|
productId: string;
|
|
1232
|
+
ownerId: string | null;
|
|
1231
1233
|
lastValidatedAt: Date;
|
|
1232
1234
|
deviceName: string;
|
|
1233
1235
|
deviceSignature: string;
|
|
1234
1236
|
expiresAt: Date;
|
|
1235
1237
|
externalId?: string | undefined;
|
|
1236
|
-
ownerId?: string | undefined;
|
|
1237
1238
|
}, {
|
|
1238
1239
|
status: TrialStatus;
|
|
1239
1240
|
id: string;
|
|
1240
1241
|
productId: string;
|
|
1242
|
+
ownerId: string | null;
|
|
1241
1243
|
lastValidatedAt: Date;
|
|
1242
1244
|
deviceName: string;
|
|
1243
1245
|
deviceSignature: string;
|
|
1244
1246
|
expiresAt: Date;
|
|
1245
1247
|
externalId?: string | undefined;
|
|
1246
|
-
ownerId?: string | undefined;
|
|
1247
1248
|
}>;
|
|
1248
1249
|
declare const importTrialRequestSchema: z.ZodObject<{
|
|
1249
1250
|
productId: z.ZodString;
|
package/dist/index.js
CHANGED
|
@@ -139,7 +139,7 @@ var trialSchema = z4.object({
|
|
|
139
139
|
status: z4.nativeEnum(TrialStatus),
|
|
140
140
|
expiresAt: z4.coerce.date(),
|
|
141
141
|
lastValidatedAt: z4.coerce.date(),
|
|
142
|
-
ownerId: z4.string().
|
|
142
|
+
ownerId: z4.string().nullable()
|
|
143
143
|
});
|
|
144
144
|
var importTrialRequestSchema = z4.object({
|
|
145
145
|
productId: z4.string(),
|
|
@@ -376,6 +376,10 @@ var LicenseEndpoints = class {
|
|
|
376
376
|
const response = await this.api.fetch(`/api/licenses/${licenseId}/activations?${objectToQuery(opts)}`);
|
|
377
377
|
return paged(licenseActivationSchema).parse(response.data);
|
|
378
378
|
}
|
|
379
|
+
async getActivation(licenseId, activationId) {
|
|
380
|
+
const response = await this.api.fetch(`/api/licenses/${licenseId}/activations/${activationId}`);
|
|
381
|
+
return licenseActivationSchema.parse(response.data);
|
|
382
|
+
}
|
|
379
383
|
async validateActivation(licenseId, activationId) {
|
|
380
384
|
const response = await this.api.fetch(`/api/licenses/${licenseId}/activations/${activationId}/validate`, "POST");
|
|
381
385
|
return licenseActivationSchema.parse(response.data);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.122",
|
|
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",
|