@powerhousedao/service-offering 1.0.0-dev.1 → 1.0.0-dev.3

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 (34) hide show
  1. package/dist/document-models/upgrade-manifests.d.ts.map +1 -1
  2. package/dist/document-models/upgrade-manifests.js +0 -2
  3. package/dist/editors/service-offering-editor/editor.css +119 -0
  4. package/package.json +3 -2
  5. package/dist/document-models/facet/gen/schema/types.d.ts +0 -195
  6. package/dist/document-models/facet/gen/schema/types.d.ts.map +0 -1
  7. package/dist/document-models/facet/gen/schema/types.js +0 -1
  8. package/dist/document-models/facet/gen/schema/zod.d.ts +0 -18
  9. package/dist/document-models/facet/gen/schema/zod.d.ts.map +0 -1
  10. package/dist/document-models/facet/gen/schema/zod.js +0 -69
  11. package/dist/document-models/resource-instance/gen/schema/types.d.ts +0 -272
  12. package/dist/document-models/resource-instance/gen/schema/types.d.ts.map +0 -1
  13. package/dist/document-models/resource-instance/gen/schema/types.js +0 -1
  14. package/dist/document-models/resource-instance/gen/schema/zod.d.ts +0 -43
  15. package/dist/document-models/resource-instance/gen/schema/zod.d.ts.map +0 -1
  16. package/dist/document-models/resource-instance/gen/schema/zod.js +0 -185
  17. package/dist/document-models/resource-template/gen/schema/types.d.ts +0 -371
  18. package/dist/document-models/resource-template/gen/schema/types.d.ts.map +0 -1
  19. package/dist/document-models/resource-template/gen/schema/types.js +0 -1
  20. package/dist/document-models/resource-template/gen/schema/zod.d.ts +0 -52
  21. package/dist/document-models/resource-template/gen/schema/zod.d.ts.map +0 -1
  22. package/dist/document-models/resource-template/gen/schema/zod.js +0 -312
  23. package/dist/document-models/service-offering/gen/schema/types.d.ts +0 -451
  24. package/dist/document-models/service-offering/gen/schema/types.d.ts.map +0 -1
  25. package/dist/document-models/service-offering/gen/schema/types.js +0 -1
  26. package/dist/document-models/service-offering/gen/schema/zod.d.ts +0 -89
  27. package/dist/document-models/service-offering/gen/schema/zod.d.ts.map +0 -1
  28. package/dist/document-models/service-offering/gen/schema/zod.js +0 -419
  29. package/dist/document-models/subscription-instance/gen/schema/types.d.ts +0 -435
  30. package/dist/document-models/subscription-instance/gen/schema/types.d.ts.map +0 -1
  31. package/dist/document-models/subscription-instance/gen/schema/types.js +0 -1
  32. package/dist/document-models/subscription-instance/gen/schema/zod.d.ts +0 -99
  33. package/dist/document-models/subscription-instance/gen/schema/zod.d.ts.map +0 -1
  34. package/dist/document-models/subscription-instance/gen/schema/zod.js +0 -410
@@ -1,419 +0,0 @@
1
- import * as z from "zod";
2
- export const isDefinedNonNullAny = (v) => v !== undefined && v !== null;
3
- export const definedNonNullAnySchema = z
4
- .any()
5
- .refine((v) => isDefinedNonNullAny(v));
6
- export const AddOnPricingModeSchema = z.enum(["STANDALONE", "TIER_DEPENDENT"]);
7
- export const BillingCycleSchema = z.enum([
8
- "ANNUAL",
9
- "MONTHLY",
10
- "QUARTERLY",
11
- "SEMI_ANNUAL",
12
- ]);
13
- export const DiscountModeSchema = z.enum(["INHERIT_TIER", "OWN_DISCOUNTS"]);
14
- export const DiscountTypeSchema = z.enum(["FIXED_AMOUNT", "PERCENTAGE"]);
15
- export const GroupCostTypeSchema = z.enum(["RECURRING", "SETUP"]);
16
- export const ServiceStatusSchema = z.enum([
17
- "ACTIVE",
18
- "COMING_SOON",
19
- "DEPRECATED",
20
- "DRAFT",
21
- ]);
22
- export const TierPricingModeSchema = z.enum(["CUSTOM", "FIXED", "PER_SEAT"]);
23
- export function AddFacetOptionInputSchema() {
24
- return z.object({
25
- categoryKey: z.string(),
26
- lastModified: z.iso.datetime(),
27
- optionId: z.string(),
28
- });
29
- }
30
- export function AddOptionGroupInputSchema() {
31
- return z.object({
32
- defaultSelected: z.boolean(),
33
- description: z.string().nullish(),
34
- id: z.string(),
35
- isAddOn: z.boolean(),
36
- lastModified: z.iso.datetime(),
37
- name: z.string(),
38
- });
39
- }
40
- export function AddOptionGroupTierPricingInputSchema() {
41
- return z.object({
42
- amount: z.number(),
43
- currency: z.string(),
44
- lastModified: z.iso.datetime(),
45
- optionGroupId: z.string(),
46
- tierId: z.string(),
47
- });
48
- }
49
- export function AddServiceInputSchema() {
50
- return z.object({
51
- description: z.string().nullish(),
52
- displayOrder: z.number().nullish(),
53
- id: z.string(),
54
- isSetupFormation: z.boolean().nullish(),
55
- lastModified: z.iso.datetime(),
56
- optionGroupId: z.string().nullish(),
57
- title: z.string(),
58
- });
59
- }
60
- export function AddServiceLevelInputSchema() {
61
- return z.object({
62
- description: z.string().nullish(),
63
- id: z.string(),
64
- lastModified: z.iso.datetime(),
65
- level: z.string(),
66
- serviceId: z.string(),
67
- tierId: z.string(),
68
- });
69
- }
70
- export function AddTierInputSchema() {
71
- return z.object({
72
- description: z.string().nullish(),
73
- id: z.string(),
74
- isCustomPricing: z.boolean().nullish(),
75
- lastModified: z.iso.datetime(),
76
- name: z.string(),
77
- });
78
- }
79
- export function AddUsageLimitInputSchema() {
80
- return z.object({
81
- id: z.string(),
82
- lastModified: z.iso.datetime(),
83
- limit: z.number(),
84
- name: z.string(),
85
- tierId: z.string(),
86
- unit: z.string().nullish(),
87
- });
88
- }
89
- export function BillingCycleDiscountSchema() {
90
- return z.object({
91
- __typename: z.literal("BillingCycleDiscount").optional(),
92
- cycle: BillingCycleSchema,
93
- discountType: DiscountTypeSchema,
94
- discountValue: z.number(),
95
- });
96
- }
97
- export function BillingCycleDiscountInputSchema() {
98
- return z.object({
99
- cycle: BillingCycleSchema,
100
- discountType: DiscountTypeSchema,
101
- discountValue: z.number(),
102
- });
103
- }
104
- export function ChangeResourceTemplateInputSchema() {
105
- return z.object({
106
- lastModified: z.iso.datetime(),
107
- resourceTemplateId: z.string(),
108
- });
109
- }
110
- export function DeleteOptionGroupInputSchema() {
111
- return z.object({
112
- id: z.string(),
113
- lastModified: z.iso.datetime(),
114
- });
115
- }
116
- export function DeleteServiceInputSchema() {
117
- return z.object({
118
- id: z.string(),
119
- lastModified: z.iso.datetime(),
120
- });
121
- }
122
- export function DeleteTierInputSchema() {
123
- return z.object({
124
- id: z.string(),
125
- lastModified: z.iso.datetime(),
126
- });
127
- }
128
- export function FacetTargetSchema() {
129
- return z.object({
130
- __typename: z.literal("FacetTarget").optional(),
131
- categoryKey: z.string(),
132
- categoryLabel: z.string(),
133
- id: z.string(),
134
- selectedOptions: z.array(z.string()),
135
- });
136
- }
137
- export function OptionGroupSchema() {
138
- return z.object({
139
- __typename: z.literal("OptionGroup").optional(),
140
- availableBillingCycles: z.array(BillingCycleSchema),
141
- billingCycleDiscounts: z.array(z.lazy(() => BillingCycleDiscountSchema())),
142
- costType: GroupCostTypeSchema.nullish(),
143
- currency: z.string().nullish(),
144
- defaultSelected: z.boolean(),
145
- description: z.string().nullish(),
146
- discountMode: DiscountModeSchema.nullish(),
147
- id: z.string(),
148
- isAddOn: z.boolean(),
149
- name: z.string(),
150
- price: z.number().nullish(),
151
- pricingMode: AddOnPricingModeSchema,
152
- standalonePricing: z.lazy(() => TierPricingSchema().nullish()),
153
- tierDependentPricing: z.array(z.lazy(() => TierDependentPricingSchema())),
154
- });
155
- }
156
- export function RemoveFacetOptionInputSchema() {
157
- return z.object({
158
- categoryKey: z.string(),
159
- lastModified: z.iso.datetime(),
160
- optionId: z.string(),
161
- });
162
- }
163
- export function RemoveFacetTargetInputSchema() {
164
- return z.object({
165
- categoryKey: z.string(),
166
- lastModified: z.iso.datetime(),
167
- });
168
- }
169
- export function RemoveOptionGroupTierPricingInputSchema() {
170
- return z.object({
171
- lastModified: z.iso.datetime(),
172
- optionGroupId: z.string(),
173
- tierId: z.string(),
174
- });
175
- }
176
- export function RemoveServiceLevelInputSchema() {
177
- return z.object({
178
- id: z.string(),
179
- lastModified: z.iso.datetime(),
180
- tierId: z.string(),
181
- });
182
- }
183
- export function RemoveUsageLimitInputSchema() {
184
- return z.object({
185
- id: z.string(),
186
- lastModified: z.iso.datetime(),
187
- tierId: z.string(),
188
- });
189
- }
190
- export function SelectResourceTemplateInputSchema() {
191
- return z.object({
192
- lastModified: z.iso.datetime(),
193
- resourceTemplateId: z.string(),
194
- });
195
- }
196
- export function ServiceSchema() {
197
- return z.object({
198
- __typename: z.literal("Service").optional(),
199
- description: z.string().nullish(),
200
- displayOrder: z.number().nullish(),
201
- id: z.string(),
202
- isSetupFormation: z.boolean(),
203
- optionGroupId: z.string().nullish(),
204
- title: z.string(),
205
- });
206
- }
207
- export function ServiceOfferingStateSchema() {
208
- return z.object({
209
- __typename: z.literal("ServiceOfferingState").optional(),
210
- availableBillingCycles: z.array(BillingCycleSchema),
211
- description: z.string().nullish(),
212
- facetTargets: z.array(z.lazy(() => FacetTargetSchema())),
213
- id: z.string(),
214
- infoLink: z.url().nullish(),
215
- lastModified: z.iso.datetime(),
216
- operatorId: z.string(),
217
- optionGroups: z.array(z.lazy(() => OptionGroupSchema())),
218
- resourceTemplateId: z.string().nullish(),
219
- services: z.array(z.lazy(() => ServiceSchema())),
220
- status: ServiceStatusSchema,
221
- summary: z.string(),
222
- thumbnailUrl: z.url().nullish(),
223
- tiers: z.array(z.lazy(() => ServiceSubscriptionTierSchema())),
224
- title: z.string(),
225
- });
226
- }
227
- export function ServiceSubscriptionTierSchema() {
228
- return z.object({
229
- __typename: z.literal("ServiceSubscriptionTier").optional(),
230
- billingCycleDiscounts: z.array(z.lazy(() => BillingCycleDiscountSchema())),
231
- defaultBillingCycle: BillingCycleSchema.nullish(),
232
- description: z.string().nullish(),
233
- id: z.string(),
234
- isCustomPricing: z.boolean(),
235
- name: z.string(),
236
- pricing: z.lazy(() => TierPricingSchema().nullish()),
237
- pricingMode: TierPricingModeSchema,
238
- serviceLevels: z.array(z.lazy(() => TierServiceLevelSchema())),
239
- usageLimits: z.array(z.lazy(() => UsageLimitSchema())),
240
- });
241
- }
242
- export function SetAvailableBillingCyclesInputSchema() {
243
- return z.object({
244
- billingCycles: z.array(BillingCycleSchema),
245
- lastModified: z.iso.datetime(),
246
- });
247
- }
248
- export function SetFacetTargetInputSchema() {
249
- return z.object({
250
- categoryKey: z.string(),
251
- categoryLabel: z.string(),
252
- id: z.string(),
253
- lastModified: z.iso.datetime(),
254
- selectedOptions: z.array(z.string()),
255
- });
256
- }
257
- export function SetOfferingIdInputSchema() {
258
- return z.object({
259
- id: z.string(),
260
- lastModified: z.iso.datetime(),
261
- });
262
- }
263
- export function SetOperatorInputSchema() {
264
- return z.object({
265
- lastModified: z.iso.datetime(),
266
- operatorId: z.string(),
267
- });
268
- }
269
- export function SetOptionGroupDiscountModeInputSchema() {
270
- return z.object({
271
- discountMode: DiscountModeSchema,
272
- lastModified: z.iso.datetime(),
273
- optionGroupId: z.string(),
274
- });
275
- }
276
- export function SetOptionGroupStandalonePricingInputSchema() {
277
- return z.object({
278
- amount: z.number(),
279
- currency: z.string(),
280
- lastModified: z.iso.datetime(),
281
- optionGroupId: z.string(),
282
- });
283
- }
284
- export function SetTierBillingCycleDiscountsInputSchema() {
285
- return z.object({
286
- discounts: z.array(z.lazy(() => BillingCycleDiscountInputSchema())),
287
- lastModified: z.iso.datetime(),
288
- tierId: z.string(),
289
- });
290
- }
291
- export function SetTierDefaultBillingCycleInputSchema() {
292
- return z.object({
293
- defaultBillingCycle: BillingCycleSchema,
294
- lastModified: z.iso.datetime(),
295
- tierId: z.string(),
296
- });
297
- }
298
- export function SetTierPricingModeInputSchema() {
299
- return z.object({
300
- lastModified: z.iso.datetime(),
301
- pricingMode: TierPricingModeSchema,
302
- tierId: z.string(),
303
- });
304
- }
305
- export function TierDependentPricingSchema() {
306
- return z.object({
307
- __typename: z.literal("TierDependentPricing").optional(),
308
- amount: z.number(),
309
- currency: z.string(),
310
- tierId: z.string(),
311
- });
312
- }
313
- export function TierPricingSchema() {
314
- return z.object({
315
- __typename: z.literal("TierPricing").optional(),
316
- amount: z.number(),
317
- currency: z.string(),
318
- });
319
- }
320
- export function TierServiceLevelSchema() {
321
- return z.object({
322
- __typename: z.literal("TierServiceLevel").optional(),
323
- description: z.string().nullish(),
324
- id: z.string(),
325
- level: z.string(),
326
- serviceId: z.string(),
327
- });
328
- }
329
- export function UpdateOfferingInfoInputSchema() {
330
- return z.object({
331
- description: z.string().nullish(),
332
- infoLink: z.url().nullish(),
333
- lastModified: z.iso.datetime(),
334
- summary: z.string().nullish(),
335
- thumbnailUrl: z.url().nullish(),
336
- title: z.string().nullish(),
337
- });
338
- }
339
- export function UpdateOfferingStatusInputSchema() {
340
- return z.object({
341
- lastModified: z.iso.datetime(),
342
- status: ServiceStatusSchema,
343
- });
344
- }
345
- export function UpdateOptionGroupInputSchema() {
346
- return z.object({
347
- defaultSelected: z.boolean().nullish(),
348
- description: z.string().nullish(),
349
- id: z.string(),
350
- isAddOn: z.boolean().nullish(),
351
- lastModified: z.iso.datetime(),
352
- name: z.string().nullish(),
353
- });
354
- }
355
- export function UpdateOptionGroupTierPricingInputSchema() {
356
- return z.object({
357
- amount: z.number(),
358
- currency: z.string(),
359
- lastModified: z.iso.datetime(),
360
- optionGroupId: z.string(),
361
- tierId: z.string(),
362
- });
363
- }
364
- export function UpdateServiceInputSchema() {
365
- return z.object({
366
- description: z.string().nullish(),
367
- displayOrder: z.number().nullish(),
368
- id: z.string(),
369
- isSetupFormation: z.boolean().nullish(),
370
- lastModified: z.iso.datetime(),
371
- optionGroupId: z.string().nullish(),
372
- title: z.string().nullish(),
373
- });
374
- }
375
- export function UpdateServiceLevelInputSchema() {
376
- return z.object({
377
- description: z.string().nullish(),
378
- id: z.string(),
379
- lastModified: z.iso.datetime(),
380
- level: z.string().nullish(),
381
- tierId: z.string(),
382
- });
383
- }
384
- export function UpdateTierInputSchema() {
385
- return z.object({
386
- description: z.string().nullish(),
387
- id: z.string(),
388
- isCustomPricing: z.boolean().nullish(),
389
- lastModified: z.iso.datetime(),
390
- name: z.string().nullish(),
391
- });
392
- }
393
- export function UpdateTierPricingInputSchema() {
394
- return z.object({
395
- amount: z.number(),
396
- currency: z.string(),
397
- lastModified: z.iso.datetime(),
398
- tierId: z.string(),
399
- });
400
- }
401
- export function UpdateUsageLimitInputSchema() {
402
- return z.object({
403
- id: z.string(),
404
- lastModified: z.iso.datetime(),
405
- limit: z.number().nullish(),
406
- name: z.string().nullish(),
407
- tierId: z.string(),
408
- unit: z.string().nullish(),
409
- });
410
- }
411
- export function UsageLimitSchema() {
412
- return z.object({
413
- __typename: z.literal("UsageLimit").optional(),
414
- id: z.string(),
415
- limit: z.number(),
416
- name: z.string(),
417
- unit: z.string().nullish(),
418
- });
419
- }