@cargo-ai/types 1.0.1 → 1.0.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 (96) hide show
  1. package/README.md +47 -0
  2. package/build/src/ai/ai.d.ts +462 -0
  3. package/build/src/ai/ai.d.ts.map +1 -0
  4. package/build/src/ai/ai.js +1 -0
  5. package/build/src/ai/index.d.ts +3 -0
  6. package/build/src/ai/index.d.ts.map +1 -0
  7. package/build/src/ai/index.js +2 -0
  8. package/build/src/ai/utils.d.ts +6 -0
  9. package/build/src/ai/utils.d.ts.map +1 -0
  10. package/build/src/ai/utils.js +82 -0
  11. package/build/src/billing/billing.d.ts +100 -0
  12. package/build/src/billing/billing.d.ts.map +1 -0
  13. package/build/src/billing/billing.js +1 -0
  14. package/build/src/billing/index.d.ts +2 -0
  15. package/build/src/billing/index.d.ts.map +1 -0
  16. package/build/src/billing/index.js +1 -0
  17. package/build/src/connection/connection.d.ts +650 -0
  18. package/build/src/connection/connection.d.ts.map +1 -0
  19. package/build/src/connection/connection.js +2 -0
  20. package/build/src/connection/index.d.ts +2 -0
  21. package/build/src/connection/index.d.ts.map +1 -0
  22. package/build/src/connection/index.js +1 -0
  23. package/build/src/expression/expression.d.ts +66 -0
  24. package/build/src/expression/expression.d.ts.map +1 -0
  25. package/build/src/expression/expression.js +2 -0
  26. package/build/src/expression/index.d.ts +3 -0
  27. package/build/src/expression/index.d.ts.map +1 -0
  28. package/build/src/expression/index.js +2 -0
  29. package/build/src/expression/utils.d.ts +4 -0
  30. package/build/src/expression/utils.d.ts.map +1 -0
  31. package/build/src/expression/utils.js +63 -0
  32. package/build/src/global/index.d.ts +2 -0
  33. package/build/src/global/index.d.ts.map +1 -0
  34. package/build/src/global/index.js +1 -0
  35. package/build/src/global/utils.d.ts +5 -0
  36. package/build/src/global/utils.d.ts.map +1 -0
  37. package/build/src/global/utils.js +32 -0
  38. package/build/src/index.d.ts +13 -0
  39. package/build/src/index.d.ts.map +1 -0
  40. package/build/src/index.js +12 -0
  41. package/build/src/orchestration/index.d.ts +3 -0
  42. package/build/src/orchestration/index.d.ts.map +1 -0
  43. package/build/src/orchestration/index.js +2 -0
  44. package/build/src/orchestration/orchestration.d.ts +534 -0
  45. package/build/src/orchestration/orchestration.d.ts.map +1 -0
  46. package/build/src/orchestration/orchestration.js +1 -0
  47. package/build/src/orchestration/utils.d.ts +7 -0
  48. package/build/src/orchestration/utils.d.ts.map +1 -0
  49. package/build/src/orchestration/utils.js +90 -0
  50. package/build/src/revenueOrganization/index.d.ts +2 -0
  51. package/build/src/revenueOrganization/index.d.ts.map +1 -0
  52. package/build/src/revenueOrganization/index.js +1 -0
  53. package/build/src/revenueOrganization/revenueOrganization.d.ts +114 -0
  54. package/build/src/revenueOrganization/revenueOrganization.d.ts.map +1 -0
  55. package/build/src/revenueOrganization/revenueOrganization.js +2 -0
  56. package/build/src/segmentation/index.d.ts +2 -0
  57. package/build/src/segmentation/index.d.ts.map +1 -0
  58. package/build/src/segmentation/index.js +1 -0
  59. package/build/src/segmentation/segmentation.d.ts +74 -0
  60. package/build/src/segmentation/segmentation.d.ts.map +1 -0
  61. package/build/src/segmentation/segmentation.js +1 -0
  62. package/build/src/storage/index.d.ts +2 -0
  63. package/build/src/storage/index.d.ts.map +1 -0
  64. package/build/src/storage/index.js +1 -0
  65. package/build/src/storage/storage.d.ts +144 -0
  66. package/build/src/storage/storage.d.ts.map +1 -0
  67. package/build/src/storage/storage.js +2 -0
  68. package/build/src/systemOfRecordIntegration/clients/bigQuery.d.ts +26 -0
  69. package/build/src/systemOfRecordIntegration/clients/bigQuery.d.ts.map +1 -0
  70. package/build/src/systemOfRecordIntegration/clients/bigQuery.js +1 -0
  71. package/build/src/systemOfRecordIntegration/clients/snowflake.d.ts +26 -0
  72. package/build/src/systemOfRecordIntegration/clients/snowflake.d.ts.map +1 -0
  73. package/build/src/systemOfRecordIntegration/clients/snowflake.js +1 -0
  74. package/build/src/systemOfRecordIntegration/index.d.ts +2 -0
  75. package/build/src/systemOfRecordIntegration/index.d.ts.map +1 -0
  76. package/build/src/systemOfRecordIntegration/index.js +1 -0
  77. package/build/src/systemOfRecordIntegration/systemOfRecordIntegration.d.ts +777 -0
  78. package/build/src/systemOfRecordIntegration/systemOfRecordIntegration.d.ts.map +1 -0
  79. package/build/src/systemOfRecordIntegration/systemOfRecordIntegration.js +2 -0
  80. package/build/src/userManagement/index.d.ts +2 -0
  81. package/build/src/userManagement/index.d.ts.map +1 -0
  82. package/build/src/userManagement/index.js +1 -0
  83. package/build/src/userManagement/userManagement.d.ts +21 -0
  84. package/build/src/userManagement/userManagement.d.ts.map +1 -0
  85. package/build/src/userManagement/userManagement.js +1 -0
  86. package/build/src/utils.d.ts +9 -0
  87. package/build/src/utils.d.ts.map +1 -0
  88. package/build/src/utils.js +1 -0
  89. package/build/src/workspaceManagement/index.d.ts +2 -0
  90. package/build/src/workspaceManagement/index.d.ts.map +1 -0
  91. package/build/src/workspaceManagement/index.js +1 -0
  92. package/build/src/workspaceManagement/workspaceManagement.d.ts +79 -0
  93. package/build/src/workspaceManagement/workspaceManagement.d.ts.map +1 -0
  94. package/build/src/workspaceManagement/workspaceManagement.js +1 -0
  95. package/build/tsconfig.tsbuildinfo +1 -0
  96. package/package.json +8 -2
@@ -0,0 +1,100 @@
1
+ import type { Schema as JsonSchema } from "jsonschema";
2
+ export declare namespace BillingTypes {
3
+ type UsageUnit = "billing.credits" | "storage.records" | "orchestration.executions";
4
+ type CreditsCost = {
5
+ config?: {
6
+ jsonSchema: JsonSchema;
7
+ };
8
+ cost: number;
9
+ } & ({
10
+ type: "fixed";
11
+ } | {
12
+ type: "unit";
13
+ unit: string;
14
+ } | {
15
+ type: "package";
16
+ unit: string;
17
+ unitsCount: number;
18
+ fixedCost?: number;
19
+ });
20
+ type Usage = {
21
+ uuid: string;
22
+ workspaceUuid: string;
23
+ workflowUuid: string | null;
24
+ agentUuid: string | null;
25
+ connectorUuid: string | null;
26
+ integrationSlug: string | null;
27
+ slug: string;
28
+ modelUuid: string | null;
29
+ count: number;
30
+ unit: UsageUnit;
31
+ createdAt: Date;
32
+ };
33
+ type Subscription = {
34
+ uuid: string;
35
+ workspaceUuid: string;
36
+ provider: "stripe" | "orb";
37
+ customerOrbId: string;
38
+ customerStripeId: string;
39
+ subscriptionStatus: string | null;
40
+ subscriptionStripeId: string | null;
41
+ subscriptionAvailableCreditsCount: number;
42
+ subscriptionCreditsUsedCount: number;
43
+ additionalAvailableCreditsCount: number;
44
+ creditsOverageBehaviors: SubscriptionCreditsOverageBehavior[];
45
+ createdAt: Date;
46
+ updatedAt: Date;
47
+ };
48
+ type SubscriptionCadence = "monthly" | "annual" | "one_time" | "quarterly" | "semi_annual" | "custom";
49
+ type SubscriptionPlan = "self-serve" | "enterprise";
50
+ type SubscriptionCreditsOverageBehavior = {
51
+ unit: UsageUnit;
52
+ action: "deny" | "allow";
53
+ };
54
+ type EnrichedSubscription = Subscription & {
55
+ plan: SubscriptionPlan;
56
+ cadence: SubscriptionCadence;
57
+ fixedPrice: number;
58
+ conversionRate: number;
59
+ startAt: Date;
60
+ resetAt: Date;
61
+ endAt: Date | null;
62
+ hasPendingChange: boolean;
63
+ hasCredits: boolean;
64
+ futureChange: {
65
+ cadence: SubscriptionCadence;
66
+ fixedPrice: number;
67
+ creditsCount: number;
68
+ conversionRate: number;
69
+ startAt: Date;
70
+ endAt: Date | null;
71
+ } | null;
72
+ topup: {
73
+ creditsCount: number;
74
+ threshold: number;
75
+ } | null;
76
+ };
77
+ type Invoice = {
78
+ id: string;
79
+ isPaid: boolean;
80
+ currency: string;
81
+ amount: number;
82
+ dueDate?: Date;
83
+ url?: string;
84
+ };
85
+ type CreditCard = {
86
+ brand: string;
87
+ expMonth: number;
88
+ expYear: number;
89
+ last4: string;
90
+ };
91
+ type UsageMetric = {
92
+ date: Date;
93
+ items: {
94
+ slug: string;
95
+ count: number;
96
+ groupBy: string | null;
97
+ }[];
98
+ };
99
+ }
100
+ //# sourceMapping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AM,CAAC;SACnB,GAAG,IAAI,CAAC;KACV,CAAC;IAEF,KAAY,OAAO,GAAG;QACpB,EAAE,EAAE,MAAM,CAAC;QACX,MAAM,EAAE,OAAO,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,IAAI,CAAC;QACf,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IAEF,KAAY,UAAU,GAAG;QACvB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,KAAY,WAAW,GAAG;QACxB,IAAI,EAAE,IAAI,CAAC;QACX,KAAK,EAAE;YACL,IAAI,EAAE,MAAM,CAAC;YACb,KAAK,EAAE,MAAM,CAAC;YACd,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;SACxB,EAAE,CAAC;KACL,CAAC;CACH"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./billing.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/billing/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./billing.js";