@verma-consulting/common-library 0.1.10 → 0.1.12

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.js CHANGED
@@ -60,6 +60,7 @@ __export(index_exports, {
60
60
  currency: () => currency,
61
61
  customerType: () => customerType,
62
62
  defaults: () => defaults_default,
63
+ defaultsWithTypes: () => defaultsWithTypes_default,
63
64
  formatPhoneNumber: () => formatPhoneNumber,
64
65
  getRandomArbitrary: () => getRandomArbitrary,
65
66
  grabAge: () => grabAge,
@@ -2144,6 +2145,7 @@ var defaults = {
2144
2145
  frequencyField: "createdAt",
2145
2146
  modelName: "",
2146
2147
  fieldName: "",
2148
+ fieldType: "",
2147
2149
  operationType: "Count",
2148
2150
  calculation: "Empty",
2149
2151
  calculationValue: ""
@@ -2154,6 +2156,7 @@ var defaults = {
2154
2156
  dynamic: false,
2155
2157
  modelName: "",
2156
2158
  fieldName: "",
2159
+ fieldType: "",
2157
2160
  calculation: "Empty",
2158
2161
  calculationValue: ""
2159
2162
  },
@@ -2162,6 +2165,7 @@ var defaults = {
2162
2165
  star: false,
2163
2166
  modelName: "",
2164
2167
  fieldName: "",
2168
+ fieldType: "",
2165
2169
  operationType: "Count",
2166
2170
  calculation: "Empty",
2167
2171
  calculationValue: ""
@@ -2230,6 +2234,409 @@ var defaults = {
2230
2234
  }
2231
2235
  };
2232
2236
  var defaults_default = defaults;
2237
+
2238
+ // src/defaultsWithTypes.ts
2239
+ var defaultsWithTypes = {
2240
+ users: {
2241
+ firstName: { default: "", type: "String" },
2242
+ lastName: { default: "", type: "String" },
2243
+ email: { default: "", type: "String" },
2244
+ role: { default: "Employee", type: "String" },
2245
+ status: { default: "Pending", type: "String" },
2246
+ userName: { default: "", type: "String" },
2247
+ jobTitle: { default: "", type: "String" },
2248
+ password: { default: "", type: "String" },
2249
+ dateOfBirth: { default: null, type: "Date" },
2250
+ phoneNumber: { default: "", type: "String" },
2251
+ permissions: { default: [], type: "[String]" },
2252
+ avatar: { default: null, type: "String" },
2253
+ notificationSettings: {
2254
+ dailyReports: { default: false, type: "Boolean" },
2255
+ dealsClosing: { default: false, type: "Boolean" },
2256
+ deletionAlerts: { default: false, type: "Boolean" },
2257
+ device: { default: "Do Not Notify", type: "String" }
2258
+ },
2259
+ platformSettings: {
2260
+ mode: { default: "light", type: "String" },
2261
+ language: { default: "english", type: "String" },
2262
+ currency: { default: "usd", type: "String" }
2263
+ }
2264
+ },
2265
+ clients: {
2266
+ name: { default: "", type: "String" },
2267
+ description: { default: "", type: "String" },
2268
+ status: { default: "Ready", type: "String" },
2269
+ email: { default: "", type: "String" },
2270
+ contactName: { default: "", type: "String" },
2271
+ phone: { default: "", type: "String" },
2272
+ accountNumber: { default: "", type: "String" },
2273
+ invoicePrefix: { default: "", type: "String" },
2274
+ sicCode: { default: "", type: "String" },
2275
+ clientType: { default: "Company", type: "String" },
2276
+ currency: { default: "usd", type: "String" },
2277
+ customerType: { default: "Trial", type: "String" },
2278
+ industry: { default: "", type: "String" },
2279
+ annualRevenue: { default: 0, type: "Int" },
2280
+ balance: { default: 0, type: "Int" },
2281
+ nextInvoiceSequence: { default: 0, type: "Int" },
2282
+ taxExempt: { default: "null", type: "String" },
2283
+ website: { default: "", type: "String" },
2284
+ source: { default: "Advertisement", type: "String" },
2285
+ logoUrl: { default: "", type: "String" },
2286
+ linkedinUrl: { default: "", type: "String" },
2287
+ facebookUrl: { default: "", type: "String" },
2288
+ twitterUrl: { default: "", type: "String" },
2289
+ angelUrl: { default: "", type: "String" },
2290
+ crunchbaseUrl: { default: "", type: "String" },
2291
+ accountOwner: { default: "", type: "ID" },
2292
+ contacts: { default: "", type: "String" },
2293
+ deals: { default: "", type: "String" },
2294
+ invoices: { default: "", type: "String" },
2295
+ engagements: { default: "", type: "String" },
2296
+ tasks: { default: "", type: "String" }
2297
+ },
2298
+ contacts: {
2299
+ name: { default: "", type: "String" },
2300
+ description: { default: "", type: "String" },
2301
+ status: { default: "Ready", type: "String" },
2302
+ email: { default: "", type: "String" },
2303
+ phoneNumber: { default: "", type: "String" },
2304
+ role: { default: "", type: "String" },
2305
+ linkedinUrl: { default: "", type: "String" },
2306
+ twitterUrl: { default: "", type: "String" },
2307
+ client: { default: "", type: "ID" },
2308
+ engagements: { default: "", type: "String" }
2309
+ },
2310
+ inventories: {
2311
+ name: { default: "", type: "String" },
2312
+ description: { default: "", type: "String" },
2313
+ status: { default: "Ready", type: "String" },
2314
+ amount: { default: 0, type: "Int" },
2315
+ quantity: { default: 0, type: "Int" }
2316
+ },
2317
+ organizations: {
2318
+ name: { default: "", type: "String" },
2319
+ website: { default: "", type: "String" },
2320
+ industry: { default: "", type: "String" },
2321
+ currency: { default: "usd", type: "String" },
2322
+ linkedinUrl: { default: "", type: "String" },
2323
+ facebookUrl: { default: "", type: "String" },
2324
+ twitterUrl: { default: "", type: "String" },
2325
+ angelUrl: { default: "", type: "String" },
2326
+ crunchbaseUrl: { default: "", type: "String" }
2327
+ },
2328
+ activities: {
2329
+ label: { default: "", type: "String" },
2330
+ value: { default: "", type: "String" },
2331
+ modelName: { default: "", type: "String" },
2332
+ path: { default: "", type: "String" }
2333
+ },
2334
+ leads: {
2335
+ name: { default: "", type: "String" },
2336
+ description: { default: "", type: "String" },
2337
+ status: { default: "Ready", type: "String" },
2338
+ leadType: { default: "AttemtpedToContact", type: "String" },
2339
+ source: { default: "Advertisement", type: "String" },
2340
+ amount: { default: 0, type: "Int" },
2341
+ projectedClosingDate: { default: null, type: "Date" },
2342
+ expectedRevenue: { default: 0, type: "Int" },
2343
+ probability: { default: 0, type: "Int" },
2344
+ nextStep: { default: "", type: "String" },
2345
+ accountOwner: { default: "", type: "ID" },
2346
+ client: { default: "", type: "ID" },
2347
+ campaign: { default: "", type: "ID" }
2348
+ },
2349
+ deals: {
2350
+ name: { default: "", type: "String" },
2351
+ description: { default: "", type: "String" },
2352
+ status: { default: "Ready", type: "String" },
2353
+ dealType: { default: "New", type: "String" },
2354
+ source: { default: "Advertisement", type: "String" },
2355
+ amount: { default: 0, type: "Int" },
2356
+ closingDate: { default: null, type: "Date" },
2357
+ expectedRevenue: { default: 0, type: "Int" },
2358
+ probability: { default: 0, type: "Int" },
2359
+ nextStep: { default: "", type: "String" },
2360
+ accountOwner: { default: "", type: "ID" },
2361
+ client: { default: "", type: "ID" },
2362
+ campaign: { default: "", type: "ID" }
2363
+ },
2364
+ campaigns: {
2365
+ name: { default: "", type: "String" },
2366
+ description: { default: "", type: "String" },
2367
+ status: { default: "Ready", type: "String" },
2368
+ priority: { default: "Medium", type: "String" },
2369
+ startDate: { default: null, type: "Date" },
2370
+ endDate: { default: null, type: "Date" },
2371
+ campaignType: { default: "Email", type: "String" },
2372
+ budgetedCost: { default: 0, type: "Int" },
2373
+ expectedRevenue: { default: 0, type: "Int" },
2374
+ actualCost: { default: 0, type: "Int" },
2375
+ numbersSent: { default: 0, type: "Int" },
2376
+ expectedResponse: { default: "", type: "String" },
2377
+ accountOwner: { default: "", type: "ID" },
2378
+ leads: { default: "", type: "ID" },
2379
+ deals: { default: "", type: "ID" }
2380
+ },
2381
+ invoices: {
2382
+ name: { default: "", type: "String" },
2383
+ description: { default: "", type: "String" },
2384
+ footer: { default: "", type: "String" },
2385
+ status: { default: "Ready", type: "String" },
2386
+ currency: { default: "usd", type: "String" },
2387
+ accountCountry: { default: "US", type: "String" },
2388
+ statementDescriptor: { default: "", type: "String" },
2389
+ dueDate: { default: null, type: "Date" },
2390
+ nextPaymentAttempt: { default: null, type: "DateTime" },
2391
+ effectiveAt: { default: null, type: "DateTime" },
2392
+ amountDue: { default: 0, type: "Int" },
2393
+ amountPaid: { default: 0, type: "Int" },
2394
+ amountRemaining: { default: 0, type: "Int" },
2395
+ amountShipping: { default: 0, type: "Int" },
2396
+ attemptCount: { default: 0, type: "Int" },
2397
+ startingBalance: { default: 0, type: "Int" },
2398
+ endingBalance: { default: 0, type: "Int" },
2399
+ subtotal: { default: 0, type: "Int" },
2400
+ subtotalExcludingTax: { default: 0, type: "Int" },
2401
+ totalExcludingTax: { default: 0, type: "Int" },
2402
+ tax: { default: 0, type: "Int" },
2403
+ postPaymentCreditNotesAmount: { default: 0, type: "Int" },
2404
+ prePaymentCreditNotesAmount: { default: 0, type: "Int" },
2405
+ daysUntilDue: { default: 0, type: "Int" },
2406
+ attempted: { default: false, type: "Boolean" },
2407
+ autoAdvance: { default: false, type: "Boolean" },
2408
+ billingReason: { default: "manual", type: "String" },
2409
+ collectionMethod: { default: "charge_automatically", type: "String" },
2410
+ customerEmail: { default: "", type: "String" },
2411
+ customerPhone: { default: "", type: "String" },
2412
+ customerTaxExempt: { default: "null", type: "String" },
2413
+ invoicePdf: { default: "", type: "String" },
2414
+ lastFinalizationError: { default: "", type: "String" },
2415
+ number: { default: null, type: "String" },
2416
+ receiptNumber: { default: "", type: "String" },
2417
+ livemode: { default: false, type: "Boolean" },
2418
+ paid: { default: false, type: "Boolean" },
2419
+ paidOutOfBand: { default: false, type: "Boolean" },
2420
+ client: { default: "", type: "ID" },
2421
+ accountOwner: { default: "", type: "ID" },
2422
+ deal: { default: "", type: "ID" }
2423
+ },
2424
+ issuer: {
2425
+ account: { default: "", type: "ID" },
2426
+ type: { default: "", type: "String" }
2427
+ },
2428
+ engagements: {
2429
+ name: { default: "", type: "String" },
2430
+ description: { default: "", type: "String" },
2431
+ status: { default: "Ready", type: "String" },
2432
+ engagementDate: { default: null, type: "Date" },
2433
+ client: { default: "", type: "ID" },
2434
+ contact: { default: "", type: "ID" }
2435
+ },
2436
+ pools: {
2437
+ name: { default: "", type: "String" },
2438
+ description: { default: "", type: "String" },
2439
+ status: { default: "Ready", type: "String" }
2440
+ },
2441
+ products: {
2442
+ name: { default: "", type: "String" },
2443
+ description: { default: null, type: "String" },
2444
+ status: { default: "Ready", type: "String" },
2445
+ productType: { default: "service", type: "String" },
2446
+ client: { default: "", type: "ID" },
2447
+ inventory: { default: "", type: "ID" },
2448
+ accountOwner: { default: "", type: "ID" },
2449
+ active: { default: true, type: "Boolean" },
2450
+ shippable: { default: false, type: "Boolean" },
2451
+ statementDescriptor: { default: "", type: "String" },
2452
+ taxCode: { default: null, type: "String" },
2453
+ unitLabel: { default: null, type: "String" },
2454
+ url: { default: "", type: "String" }
2455
+ },
2456
+ prices: {
2457
+ active: { default: true, type: "Boolean" },
2458
+ unitAmount: { default: 0, type: "Int" },
2459
+ unitAmountDecimal: { default: null, type: "Float" },
2460
+ lookupKey: { default: "", type: "String" },
2461
+ type: { default: "", type: "String" },
2462
+ taxBehavior: { default: "unspecified", type: "String" },
2463
+ currency: { default: "usd", type: "String" },
2464
+ billingScheme: { default: "", type: "String" },
2465
+ recurring: {
2466
+ intervalCount: { default: 0, type: "Int" },
2467
+ interval: { default: "", type: "String" },
2468
+ aggregateUsage: { default: "", type: "String" },
2469
+ usageType: { default: "", type: "String" },
2470
+ trialPeriodDays: { default: 0, type: "Int" }
2471
+ }
2472
+ },
2473
+ packageDimensions: {
2474
+ height: { default: 0, type: "Float" },
2475
+ length: { default: 0, type: "Float" },
2476
+ weight: { default: 0, type: "Float" },
2477
+ width: { default: 0, type: "Float" }
2478
+ },
2479
+ subscriptions: {
2480
+ name: { default: "", type: "String" },
2481
+ description: { default: null, type: "String" },
2482
+ status: { default: "Ready", type: "String" },
2483
+ trialStart: { default: null, type: "DateTime" },
2484
+ trialEnd: { default: null, type: "DateTime" },
2485
+ startDate: { default: null, type: "DateTime" },
2486
+ endedAt: { default: null, type: "DateTime" },
2487
+ currentPeriodStart: { default: null, type: "DateTime" },
2488
+ currentPeriodEnd: { default: null, type: "DateTime" },
2489
+ backdateStartDate: { default: null, type: "DateTime" },
2490
+ billingCycleAnchor: { default: null, type: "DateTime" },
2491
+ cancelAt: { default: null, type: "DateTime" },
2492
+ canceledAt: { default: null, type: "DateTime" },
2493
+ daysUntilDue: { default: 0, type: "Int" },
2494
+ trialPeriodDays: { default: 0, type: "Int" },
2495
+ applicationFeePercent: { default: 0, type: "Float" },
2496
+ cancelAtPeriodEnd: { default: false, type: "Boolean" },
2497
+ trialFromPlan: { default: false, type: "Boolean" },
2498
+ offSession: { default: false, type: "Boolean" },
2499
+ nextPendingInvoiceItemInvoice: { default: null, type: "String" },
2500
+ collectionMethod: { default: "charge_automatically", type: "String" },
2501
+ missingPaymentMethod: { default: "create_invoice", type: "String" },
2502
+ client: { default: "", type: "ID" },
2503
+ deal: { default: "", type: "ID" },
2504
+ accountOwner: { default: "", type: "ID" }
2505
+ },
2506
+ automaticTax: {
2507
+ enabled: { default: false, type: "Boolean" },
2508
+ liability: {
2509
+ account: { default: "", type: "ID" },
2510
+ type: { default: "", type: "String" }
2511
+ },
2512
+ status: { default: "", type: "String" }
2513
+ },
2514
+ pauseCollection: {
2515
+ behavior: { default: "", type: "String" },
2516
+ resumesAt: { default: null, type: "DateTime" }
2517
+ },
2518
+ cancellationDetails: {
2519
+ comment: { default: "", type: "String" },
2520
+ feedback: { default: "", type: "String" },
2521
+ reason: { default: "", type: "String" }
2522
+ },
2523
+ trialSettings: {
2524
+ endBehavior: {
2525
+ missingPaymentMethod: { default: "", type: "String" }
2526
+ }
2527
+ },
2528
+ payments: {
2529
+ name: { default: "", type: "String" },
2530
+ description: { default: "", type: "String" },
2531
+ status: { default: "Ready", type: "String" },
2532
+ paymentStatus: { default: "requires_payment_method", type: "String" },
2533
+ currency: { default: "usd", type: "String" },
2534
+ amount: { default: 0, type: "Int" },
2535
+ amountCapturable: { default: 0, type: "Int" },
2536
+ amountReceived: { default: 0, type: "Int" },
2537
+ applicationFeeAmount: { default: 0, type: "Int" },
2538
+ statementDescriptor: { default: "", type: "String" },
2539
+ statementDescriptorSuffix: { default: "", type: "String" },
2540
+ livemode: { default: false, type: "Boolean" },
2541
+ receiptEmail: { default: "", type: "String" },
2542
+ client: { default: "", type: "ID" },
2543
+ subscription: { default: "", type: "ID" },
2544
+ invoice: { default: "", type: "ID" }
2545
+ },
2546
+ reports: {
2547
+ label: { default: "", type: "String" },
2548
+ star: { default: false, type: "Boolean" },
2549
+ chartType: { default: "line", type: "String" },
2550
+ frequency: { default: "Annually", type: "String" },
2551
+ frequencyField: { default: "createdAt", type: "String" },
2552
+ modelName: { default: "", type: "String" },
2553
+ fieldName: { default: "", type: "String" },
2554
+ operationType: { default: "Count", type: "String" },
2555
+ calculation: { default: "Empty", type: "String" },
2556
+ calculationValue: { default: "", type: "String" }
2557
+ },
2558
+ lists: {
2559
+ label: { default: "", type: "String" },
2560
+ star: { default: false, type: "Boolean" },
2561
+ dynamic: { default: false, type: "Boolean" },
2562
+ modelName: { default: "", type: "String" },
2563
+ fieldName: { default: "", type: "String" },
2564
+ calculation: { default: "Empty", type: "String" },
2565
+ calculationValue: { default: "", type: "String" }
2566
+ },
2567
+ statistics: {
2568
+ label: { default: "", type: "String" },
2569
+ star: { default: false, type: "Boolean" },
2570
+ modelName: { default: "", type: "String" },
2571
+ fieldName: { default: "", type: "String" },
2572
+ operationType: { default: "Count", type: "String" },
2573
+ calculation: { default: "Empty", type: "String" },
2574
+ calculationValue: { default: "", type: "String" }
2575
+ },
2576
+ address: {
2577
+ streetNumber: { default: "", type: "String" },
2578
+ streetName: { default: "", type: "String" },
2579
+ city: { default: "", type: "String" },
2580
+ state: { default: "", type: "String" },
2581
+ country: { default: "", type: "String" },
2582
+ countryCode: { default: "", type: "String" },
2583
+ postalCode: { default: "", type: "String" },
2584
+ latitude: { default: 37.7749, type: "Float" },
2585
+ longitude: { default: -122.4194, type: "Float" }
2586
+ },
2587
+ schema: {
2588
+ deleted: { default: false, type: "Boolean" },
2589
+ selected: { default: false, type: "Boolean" },
2590
+ key: { default: "", type: "String" },
2591
+ type: { default: "", type: "String" },
2592
+ options: { default: [], type: "[String]" }
2593
+ },
2594
+ comments: {
2595
+ label: { default: "", type: "String" }
2596
+ },
2597
+ tasks: {
2598
+ name: { default: "", type: "String" },
2599
+ description: { default: "", type: "String" },
2600
+ status: { default: "Ready", type: "String" },
2601
+ priority: { default: "Medium", type: "String" },
2602
+ dueDate: { default: null, type: "Date" },
2603
+ reminder: { default: false, type: "Boolean" },
2604
+ reminderDate: { default: null, type: "Date" },
2605
+ reminderTime: { default: "", type: "Time" },
2606
+ repeat: { default: false, type: "Boolean" },
2607
+ repeatDate: { default: null, type: "Date" },
2608
+ repeatTime: { default: "", type: "Time" },
2609
+ client: { default: "", type: "ID" },
2610
+ assignee: { default: "", type: "ID" }
2611
+ },
2612
+ integrations: {
2613
+ name: { default: "", type: "String" },
2614
+ title: { default: "", type: "String" },
2615
+ description: { default: "", type: "String" },
2616
+ category: { default: "", type: "String" },
2617
+ key: { default: "", type: "String" },
2618
+ secret: { default: "", type: "String" },
2619
+ logo: { default: "", type: "String" },
2620
+ clientEmail: { default: "", type: "String" },
2621
+ customerId: { default: "", type: "String" },
2622
+ channelId: { default: "", type: "String" },
2623
+ active: { default: false, type: "Boolean" },
2624
+ importBridge: { default: false, type: "Boolean" },
2625
+ exportBridge: { default: false, type: "Boolean" },
2626
+ dynamicBridge: { default: false, type: "Boolean" }
2627
+ },
2628
+ operations: {
2629
+ label: { default: "", type: "String" },
2630
+ description: { default: "", type: "String" },
2631
+ star: { default: false, type: "Boolean" }
2632
+ },
2633
+ prompts: {
2634
+ label: { default: "", type: "String" },
2635
+ description: { default: "", type: "String" },
2636
+ active: { default: false, type: "Boolean" }
2637
+ }
2638
+ };
2639
+ var defaultsWithTypes_default = defaultsWithTypes;
2233
2640
  // Annotate the CommonJS export names for ESM import in node:
2234
2641
  0 && (module.exports = {
2235
2642
  AppMode,
@@ -2272,6 +2679,7 @@ var defaults_default = defaults;
2272
2679
  currency,
2273
2680
  customerType,
2274
2681
  defaults,
2682
+ defaultsWithTypes,
2275
2683
  formatPhoneNumber,
2276
2684
  getRandomArbitrary,
2277
2685
  grabAge,