@veruna/api-contracts 6.12.0 → 6.13.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.
@@ -1,2 +1,3 @@
1
1
  export * from './schemas';
2
2
  export * from './commands';
3
+ export * from './queries';
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./schemas"), exports);
18
18
  __exportStar(require("./commands"), exports);
19
+ __exportStar(require("./queries"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/subscription/admin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/subscription/admin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,6CAA2B;AAC3B,4CAA0B"}
@@ -0,0 +1,38 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method.enum';
3
+ export declare namespace AdminGetUserBillingQuery {
4
+ const Request: z.ZodObject<{}, z.core.$strip>;
5
+ const Response: z.ZodObject<{
6
+ subscriptions: z.ZodArray<z.ZodObject<{
7
+ id: z.ZodString;
8
+ planCode: z.ZodString;
9
+ status: z.ZodEnum<typeof import("../..").SubscriptionStatus>;
10
+ termMonths: z.ZodNumber;
11
+ termStart: z.ZodString;
12
+ termEnd: z.ZodString;
13
+ cycleStart: z.ZodString;
14
+ cycleEnd: z.ZodString;
15
+ cancelAtPeriodEnd: z.ZodBoolean;
16
+ pendingPlanCode: z.ZodNullable<z.ZodString>;
17
+ graceEndsAt: z.ZodNullable<z.ZodString>;
18
+ price: z.ZodString;
19
+ refundedAt: z.ZodNullable<z.ZodString>;
20
+ createdAt: z.ZodString;
21
+ updatedAt: z.ZodString;
22
+ }, z.core.$strip>>;
23
+ packages: z.ZodArray<z.ZodObject<{
24
+ id: z.ZodString;
25
+ planCode: z.ZodString;
26
+ status: z.ZodEnum<typeof import("../..").UserPackageStatus>;
27
+ price: z.ZodString;
28
+ expiresAt: z.ZodString;
29
+ refundedAt: z.ZodNullable<z.ZodString>;
30
+ createdAt: z.ZodString;
31
+ updatedAt: z.ZodString;
32
+ }, z.core.$strip>>;
33
+ }, z.core.$strip>;
34
+ const URL: (userId: string) => string;
35
+ const METHOD = HttpMethod.GET;
36
+ type RequestType = z.infer<typeof Request>;
37
+ type ResponseType = z.infer<typeof Response>;
38
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminGetUserBillingQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const schemas_1 = require("../schemas");
6
+ const rest_api_1 = require("../../../../rest-api");
7
+ const http_method_enum_1 = require("../../../../shared/http-method.enum");
8
+ var AdminGetUserBillingQuery;
9
+ (function (AdminGetUserBillingQuery) {
10
+ AdminGetUserBillingQuery.Request = zod_1.z.object({});
11
+ AdminGetUserBillingQuery.Response = schemas_1.AdminUserBillingResponseSchema;
12
+ AdminGetUserBillingQuery.URL = (userId) => rest_api_1.REST_API.V1.SUBSCRIPTION.ADMIN.GET_BY_USER(userId);
13
+ AdminGetUserBillingQuery.METHOD = http_method_enum_1.HttpMethod.GET;
14
+ })(AdminGetUserBillingQuery || (exports.AdminGetUserBillingQuery = AdminGetUserBillingQuery = {}));
15
+ //# sourceMappingURL=admin-get-user-billing.query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-get-user-billing.query.js","sourceRoot":"","sources":["../../../../../v1/subscription/admin/queries/admin-get-user-billing.query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAA4D;AAC5D,mDAAgD;AAChD,0EAAiE;AAEjE,IAAiB,wBAAwB,CASxC;AATD,WAAiB,wBAAwB;IACxB,gCAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,iCAAQ,GAAG,wCAA8B,CAAC;IAE1C,4BAAG,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,mBAAQ,CAAC,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7E,+BAAM,GAAG,6BAAU,CAAC,GAAG,CAAC;AAIzC,CAAC,EATgB,wBAAwB,wCAAxB,wBAAwB,QASxC"}
@@ -0,0 +1 @@
1
+ export * from './admin-get-user-billing.query';
@@ -0,0 +1,18 @@
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
+ __exportStar(require("./admin-get-user-billing.query"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../v1/subscription/admin/queries/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C"}
@@ -0,0 +1,62 @@
1
+ import { z } from 'zod';
2
+ import { SubscriptionStatus } from '../../schemas/subscription-status.enum';
3
+ import { UserPackageStatus } from '../../schemas/user-package-status.enum';
4
+ export declare const AdminUserSubscriptionItemSchema: z.ZodObject<{
5
+ id: z.ZodString;
6
+ planCode: z.ZodString;
7
+ status: z.ZodEnum<typeof SubscriptionStatus>;
8
+ termMonths: z.ZodNumber;
9
+ termStart: z.ZodString;
10
+ termEnd: z.ZodString;
11
+ cycleStart: z.ZodString;
12
+ cycleEnd: z.ZodString;
13
+ cancelAtPeriodEnd: z.ZodBoolean;
14
+ pendingPlanCode: z.ZodNullable<z.ZodString>;
15
+ graceEndsAt: z.ZodNullable<z.ZodString>;
16
+ price: z.ZodString;
17
+ refundedAt: z.ZodNullable<z.ZodString>;
18
+ createdAt: z.ZodString;
19
+ updatedAt: z.ZodString;
20
+ }, z.core.$strip>;
21
+ export type AdminUserSubscriptionItem = z.infer<typeof AdminUserSubscriptionItemSchema>;
22
+ export declare const AdminUserPackageItemSchema: z.ZodObject<{
23
+ id: z.ZodString;
24
+ planCode: z.ZodString;
25
+ status: z.ZodEnum<typeof UserPackageStatus>;
26
+ price: z.ZodString;
27
+ expiresAt: z.ZodString;
28
+ refundedAt: z.ZodNullable<z.ZodString>;
29
+ createdAt: z.ZodString;
30
+ updatedAt: z.ZodString;
31
+ }, z.core.$strip>;
32
+ export type AdminUserPackageItem = z.infer<typeof AdminUserPackageItemSchema>;
33
+ export declare const AdminUserBillingResponseSchema: z.ZodObject<{
34
+ subscriptions: z.ZodArray<z.ZodObject<{
35
+ id: z.ZodString;
36
+ planCode: z.ZodString;
37
+ status: z.ZodEnum<typeof SubscriptionStatus>;
38
+ termMonths: z.ZodNumber;
39
+ termStart: z.ZodString;
40
+ termEnd: z.ZodString;
41
+ cycleStart: z.ZodString;
42
+ cycleEnd: z.ZodString;
43
+ cancelAtPeriodEnd: z.ZodBoolean;
44
+ pendingPlanCode: z.ZodNullable<z.ZodString>;
45
+ graceEndsAt: z.ZodNullable<z.ZodString>;
46
+ price: z.ZodString;
47
+ refundedAt: z.ZodNullable<z.ZodString>;
48
+ createdAt: z.ZodString;
49
+ updatedAt: z.ZodString;
50
+ }, z.core.$strip>>;
51
+ packages: z.ZodArray<z.ZodObject<{
52
+ id: z.ZodString;
53
+ planCode: z.ZodString;
54
+ status: z.ZodEnum<typeof UserPackageStatus>;
55
+ price: z.ZodString;
56
+ expiresAt: z.ZodString;
57
+ refundedAt: z.ZodNullable<z.ZodString>;
58
+ createdAt: z.ZodString;
59
+ updatedAt: z.ZodString;
60
+ }, z.core.$strip>>;
61
+ }, z.core.$strip>;
62
+ export type AdminUserBillingResponse = z.infer<typeof AdminUserBillingResponseSchema>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminUserBillingResponseSchema = exports.AdminUserPackageItemSchema = exports.AdminUserSubscriptionItemSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const shared_1 = require("../../../../shared");
6
+ const subscription_status_enum_1 = require("../../schemas/subscription-status.enum");
7
+ const user_package_status_enum_1 = require("../../schemas/user-package-status.enum");
8
+ exports.AdminUserSubscriptionItemSchema = zod_1.z.object({
9
+ id: zod_1.z.string().regex(shared_1.UUID_REGEX),
10
+ planCode: zod_1.z.string(),
11
+ status: zod_1.z.nativeEnum(subscription_status_enum_1.SubscriptionStatus),
12
+ termMonths: zod_1.z.number().int().positive(),
13
+ termStart: zod_1.z.string().datetime({ offset: true }),
14
+ termEnd: zod_1.z.string().datetime({ offset: true }),
15
+ cycleStart: zod_1.z.string().datetime({ offset: true }),
16
+ cycleEnd: zod_1.z.string().datetime({ offset: true }),
17
+ cancelAtPeriodEnd: zod_1.z.boolean(),
18
+ pendingPlanCode: zod_1.z.string().nullable(),
19
+ graceEndsAt: zod_1.z.string().datetime({ offset: true }).nullable(),
20
+ price: zod_1.z.string(),
21
+ refundedAt: zod_1.z.string().datetime({ offset: true }).nullable(),
22
+ createdAt: zod_1.z.string().datetime({ offset: true }),
23
+ updatedAt: zod_1.z.string().datetime({ offset: true }),
24
+ });
25
+ exports.AdminUserPackageItemSchema = zod_1.z.object({
26
+ id: zod_1.z.string().regex(shared_1.UUID_REGEX),
27
+ planCode: zod_1.z.string(),
28
+ status: zod_1.z.nativeEnum(user_package_status_enum_1.UserPackageStatus),
29
+ price: zod_1.z.string(),
30
+ expiresAt: zod_1.z.string().datetime({ offset: true }),
31
+ refundedAt: zod_1.z.string().datetime({ offset: true }).nullable(),
32
+ createdAt: zod_1.z.string().datetime({ offset: true }),
33
+ updatedAt: zod_1.z.string().datetime({ offset: true }),
34
+ });
35
+ exports.AdminUserBillingResponseSchema = zod_1.z.object({
36
+ subscriptions: zod_1.z.array(exports.AdminUserSubscriptionItemSchema),
37
+ packages: zod_1.z.array(exports.AdminUserPackageItemSchema),
38
+ });
39
+ //# sourceMappingURL=admin-user-billing.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-user-billing.schema.js","sourceRoot":"","sources":["../../../../../v1/subscription/admin/schemas/admin-user-billing.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+CAAgD;AAChD,qFAA4E;AAC5E,qFAA2E;AAQ9D,QAAA,+BAA+B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAU,CAAC;IAChC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,6CAAkB,CAAC;IACxC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAChD,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC9C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACjD,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAA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EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;CACnD,CAAC,CAAC;AAIU,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,aAAa,EAAE,OAAC,CAAC,KAAK,CAAC,uCAA+B,CAAC;IACvD,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,kCAA0B,CAAC;CAChD,CAAC,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './admin-grant-subscription.schema';
2
2
  export * from './admin-grant-package.schema';
3
+ export * from './admin-user-billing.schema';
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./admin-grant-subscription.schema"), exports);
18
18
  __exportStar(require("./admin-grant-package.schema"), exports);
19
+ __exportStar(require("./admin-user-billing.schema"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../v1/subscription/admin/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAkD;AAClD,+DAA6C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../v1/subscription/admin/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAkD;AAClD,+DAA6C;AAC7C,8DAA4C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veruna/api-contracts",
3
- "version": "6.12.0",
3
+ "version": "6.13.0",
4
4
  "description": "API contracts for Veruna project - Zod schemas, types, and paths",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",