@schematichq/schematic-typescript-node 1.4.3 → 1.4.5

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 (162) hide show
  1. package/LICENSE +1 -1
  2. package/dist/BaseClient.d.ts +1 -1
  3. package/dist/Client.d.ts +11 -0
  4. package/dist/api/resources/accesstokens/exports.d.ts +2 -0
  5. package/dist/api/resources/accounts/client/Client.d.ts +10 -10
  6. package/dist/api/resources/accounts/client/requests/CountApiKeysRequest.d.ts +2 -2
  7. package/dist/api/resources/accounts/client/requests/CountAuditLogsRequest.d.ts +2 -2
  8. package/dist/api/resources/accounts/client/requests/ListApiKeysRequest.d.ts +2 -2
  9. package/dist/api/resources/accounts/client/requests/ListAuditLogsRequest.d.ts +2 -2
  10. package/dist/api/resources/accounts/client/requests/ListEnvironmentsRequest.d.ts +2 -2
  11. package/dist/api/resources/accounts/exports.d.ts +2 -0
  12. package/dist/api/resources/billing/client/Client.d.ts +34 -34
  13. package/dist/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +2 -2
  14. package/dist/api/resources/billing/client/requests/CountCustomersRequest.d.ts +2 -2
  15. package/dist/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +1 -1
  16. package/dist/api/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.d.ts +3 -3
  17. package/dist/api/resources/billing/client/requests/CreateCouponRequestBody.d.ts +4 -4
  18. package/dist/api/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +4 -4
  19. package/dist/api/resources/billing/client/requests/ListBillingPricesRequest.d.ts +3 -3
  20. package/dist/api/resources/billing/client/requests/ListBillingProductPricesRequest.d.ts +3 -3
  21. package/dist/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +2 -2
  22. package/dist/api/resources/billing/client/requests/ListCouponsRequest.d.ts +2 -2
  23. package/dist/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.d.ts +2 -2
  24. package/dist/api/resources/billing/client/requests/ListInvoicesRequest.d.ts +2 -2
  25. package/dist/api/resources/billing/client/requests/ListMetersRequest.d.ts +2 -2
  26. package/dist/api/resources/billing/client/requests/ListPaymentMethodsRequest.d.ts +2 -2
  27. package/dist/api/resources/billing/exports.d.ts +2 -0
  28. package/dist/api/resources/checkout/client/Client.d.ts +8 -8
  29. package/dist/api/resources/checkout/exports.d.ts +2 -0
  30. package/dist/api/resources/companies/client/Client.d.ts +34 -28
  31. package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +2 -2
  32. package/dist/api/resources/companies/client/requests/CountEntityKeyDefinitionsRequest.d.ts +2 -2
  33. package/dist/api/resources/companies/client/requests/CountEntityTraitDefinitionsRequest.d.ts +2 -2
  34. package/dist/api/resources/companies/client/requests/CountPlanTraitsRequest.d.ts +2 -2
  35. package/dist/api/resources/companies/client/requests/CountUsersRequest.d.ts +2 -2
  36. package/dist/api/resources/companies/client/requests/GetActiveCompanySubscriptionRequest.d.ts +2 -2
  37. package/dist/api/resources/companies/client/requests/GetEntityTraitValuesRequest.d.ts +2 -2
  38. package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +2 -2
  39. package/dist/api/resources/companies/client/requests/ListCompanyMembershipsRequest.d.ts +2 -2
  40. package/dist/api/resources/companies/client/requests/ListEntityKeyDefinitionsRequest.d.ts +2 -2
  41. package/dist/api/resources/companies/client/requests/ListEntityTraitDefinitionsRequest.d.ts +2 -2
  42. package/dist/api/resources/companies/client/requests/ListPlanChangesRequest.d.ts +2 -2
  43. package/dist/api/resources/companies/client/requests/ListPlanTraitsRequest.d.ts +2 -2
  44. package/dist/api/resources/companies/client/requests/ListUsersRequest.d.ts +2 -2
  45. package/dist/api/resources/companies/exports.d.ts +2 -0
  46. package/dist/api/resources/components/client/Client.d.ts +4 -4
  47. package/dist/api/resources/components/client/requests/CountComponentsRequest.d.ts +2 -2
  48. package/dist/api/resources/components/client/requests/ListComponentsRequest.d.ts +2 -2
  49. package/dist/api/resources/components/exports.d.ts +2 -0
  50. package/dist/api/resources/componentspublic/exports.d.ts +2 -0
  51. package/dist/api/resources/credits/client/Client.d.ts +32 -32
  52. package/dist/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.d.ts +2 -2
  53. package/dist/api/resources/credits/client/requests/CountBillingCreditsRequest.d.ts +2 -2
  54. package/dist/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.d.ts +2 -2
  55. package/dist/api/resources/credits/client/requests/CountCompanyGrantsRequest.d.ts +2 -2
  56. package/dist/api/resources/credits/client/requests/CountCreditBundlesRequest.d.ts +2 -2
  57. package/dist/api/resources/credits/client/requests/CountCreditEventLedgerRequest.d.ts +2 -2
  58. package/dist/api/resources/credits/client/requests/CountCreditLedgerRequest.d.ts +2 -2
  59. package/dist/api/resources/credits/client/requests/CreateCompanyCreditGrant.d.ts +1 -1
  60. package/dist/api/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +1 -1
  61. package/dist/api/resources/credits/client/requests/GetEnrichedCreditLedgerRequest.d.ts +2 -2
  62. package/dist/api/resources/credits/client/requests/ListBillingCreditsRequest.d.ts +2 -2
  63. package/dist/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.d.ts +2 -2
  64. package/dist/api/resources/credits/client/requests/ListCompanyGrantsRequest.d.ts +2 -2
  65. package/dist/api/resources/credits/client/requests/ListCreditBundlesRequest.d.ts +2 -2
  66. package/dist/api/resources/credits/client/requests/ListCreditEventLedgerRequest.d.ts +2 -2
  67. package/dist/api/resources/credits/client/requests/ListGrantsForCreditRequest.d.ts +2 -2
  68. package/dist/api/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.d.ts +1 -1
  69. package/dist/api/resources/credits/exports.d.ts +2 -0
  70. package/dist/api/resources/dataexports/exports.d.ts +2 -0
  71. package/dist/api/resources/entitlements/client/Client.d.ts +20 -20
  72. package/dist/api/resources/entitlements/client/requests/CountCompanyOverridesRequest.d.ts +2 -2
  73. package/dist/api/resources/entitlements/client/requests/CountFeatureCompaniesRequest.d.ts +2 -2
  74. package/dist/api/resources/entitlements/client/requests/CountFeatureUsageRequest.d.ts +2 -2
  75. package/dist/api/resources/entitlements/client/requests/CountFeatureUsersRequest.d.ts +2 -2
  76. package/dist/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.d.ts +2 -2
  77. package/dist/api/resources/entitlements/client/requests/ListCompanyOverridesRequest.d.ts +2 -2
  78. package/dist/api/resources/entitlements/client/requests/ListFeatureCompaniesRequest.d.ts +2 -2
  79. package/dist/api/resources/entitlements/client/requests/ListFeatureUsageRequest.d.ts +2 -2
  80. package/dist/api/resources/entitlements/client/requests/ListFeatureUsersRequest.d.ts +2 -2
  81. package/dist/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.d.ts +2 -2
  82. package/dist/api/resources/entitlements/exports.d.ts +2 -0
  83. package/dist/api/resources/events/client/Client.d.ts +4 -4
  84. package/dist/api/resources/events/client/requests/GetEventSummariesRequest.d.ts +2 -2
  85. package/dist/api/resources/events/client/requests/ListEventsRequest.d.ts +2 -2
  86. package/dist/api/resources/events/exports.d.ts +2 -0
  87. package/dist/api/resources/features/client/Client.d.ts +9 -9
  88. package/dist/api/resources/features/client/requests/CountFeaturesRequest.d.ts +2 -2
  89. package/dist/api/resources/features/client/requests/CountFlagsRequest.d.ts +2 -2
  90. package/dist/api/resources/features/client/requests/ListFeaturesRequest.d.ts +2 -2
  91. package/dist/api/resources/features/client/requests/ListFlagsRequest.d.ts +2 -2
  92. package/dist/api/resources/features/client/requests/UpdateFlagRulesRequestBody.d.ts +1 -1
  93. package/dist/api/resources/features/exports.d.ts +2 -0
  94. package/dist/api/resources/planbundle/exports.d.ts +2 -0
  95. package/dist/api/resources/plangroups/exports.d.ts +2 -0
  96. package/dist/api/resources/planmigrations/client/Client.d.ts +8 -8
  97. package/dist/api/resources/planmigrations/client/requests/CountCompanyMigrationsRequest.d.ts +2 -2
  98. package/dist/api/resources/planmigrations/client/requests/CountMigrationsRequest.d.ts +2 -2
  99. package/dist/api/resources/planmigrations/client/requests/ListCompanyMigrationsRequest.d.ts +2 -2
  100. package/dist/api/resources/planmigrations/client/requests/ListMigrationsRequest.d.ts +2 -2
  101. package/dist/api/resources/planmigrations/exports.d.ts +2 -0
  102. package/dist/api/resources/plans/client/Client.d.ts +6 -4
  103. package/dist/api/resources/plans/client/requests/CountPlansRequest.d.ts +5 -2
  104. package/dist/api/resources/plans/client/requests/ListPlansRequest.d.ts +5 -2
  105. package/dist/api/resources/plans/exports.d.ts +2 -0
  106. package/dist/api/resources/plans/types/CountPlansParams.d.ts +2 -0
  107. package/dist/api/resources/plans/types/ListPlansParams.d.ts +2 -0
  108. package/dist/api/resources/scheduledcheckout/client/Client.d.ts +2 -2
  109. package/dist/api/resources/scheduledcheckout/client/requests/ListScheduledCheckoutsRequest.d.ts +2 -2
  110. package/dist/api/resources/scheduledcheckout/exports.d.ts +2 -0
  111. package/dist/api/resources/webhooks/client/Client.d.ts +8 -8
  112. package/dist/api/resources/webhooks/client/requests/CountWebhookEventsRequest.d.ts +2 -2
  113. package/dist/api/resources/webhooks/client/requests/CountWebhooksRequest.d.ts +2 -2
  114. package/dist/api/resources/webhooks/client/requests/ListWebhookEventsRequest.d.ts +2 -2
  115. package/dist/api/resources/webhooks/client/requests/ListWebhooksRequest.d.ts +2 -2
  116. package/dist/api/resources/webhooks/exports.d.ts +2 -0
  117. package/dist/api/types/CaptureRawEvent.d.ts +1 -1
  118. package/dist/api/types/ConditionGroupResponseData.d.ts +0 -1
  119. package/dist/api/types/ConditionGroupView.d.ts +0 -1
  120. package/dist/api/types/ConditionResponseData.d.ts +0 -1
  121. package/dist/api/types/ConditionView.d.ts +0 -1
  122. package/dist/api/types/DataEventPayload.d.ts +7 -0
  123. package/dist/api/types/ManagePlanRequest.d.ts +1 -0
  124. package/dist/api/types/PlanSelection.d.ts +1 -0
  125. package/dist/api/types/RuleView.d.ts +0 -1
  126. package/dist/api/types/RulesEngineSchemaVersion.d.ts +1 -1
  127. package/dist/api/types/WebScheduledDowngradeWebhookOutput.d.ts +10 -0
  128. package/dist/api/types/WebhookRequestType.d.ts +1 -0
  129. package/dist/api/types/index.d.ts +2 -0
  130. package/dist/auth/HeaderAuthProvider.d.ts +14 -10
  131. package/dist/core/fetcher/BinaryResponse.d.ts +1 -1
  132. package/dist/core/fetcher/EndpointSupplier.d.ts +2 -2
  133. package/dist/core/fetcher/Fetcher.d.ts +1 -2
  134. package/dist/core/fetcher/index.d.ts +2 -0
  135. package/dist/core/fetcher/makePassthroughRequest.d.ts +49 -0
  136. package/dist/core/fetcher/makeRequest.d.ts +6 -1
  137. package/dist/core/headers.d.ts +2 -2
  138. package/dist/core/schemas/builders/record/index.d.ts +2 -2
  139. package/dist/core/schemas/builders/record/record.d.ts +2 -1
  140. package/dist/core/schemas/builders/record/types.d.ts +2 -0
  141. package/dist/datastream/merge.d.ts +30 -0
  142. package/dist/index.js +3 -3
  143. package/dist/serialization/resources/plans/types/CountPlansParams.d.ts +1 -0
  144. package/dist/serialization/resources/plans/types/ListPlansParams.d.ts +1 -0
  145. package/dist/serialization/types/CaptureRawEvent.d.ts +1 -1
  146. package/dist/serialization/types/ConditionGroupResponseData.d.ts +0 -1
  147. package/dist/serialization/types/ConditionGroupView.d.ts +0 -1
  148. package/dist/serialization/types/ConditionResponseData.d.ts +0 -1
  149. package/dist/serialization/types/ConditionView.d.ts +0 -1
  150. package/dist/serialization/types/DataEventPayload.d.ts +13 -0
  151. package/dist/serialization/types/ManagePlanRequest.d.ts +1 -0
  152. package/dist/serialization/types/PlanSelection.d.ts +1 -0
  153. package/dist/serialization/types/RuleView.d.ts +0 -1
  154. package/dist/serialization/types/RulesEngineSchemaVersion.d.ts +1 -1
  155. package/dist/serialization/types/WebScheduledDowngradeWebhookOutput.d.ts +17 -0
  156. package/dist/serialization/types/WebhookRequestType.d.ts +1 -1
  157. package/dist/serialization/types/index.d.ts +2 -0
  158. package/dist/wasm/rulesengine.d.ts +10 -0
  159. package/dist/wasm/rulesengine.js +193 -0
  160. package/dist/wasm/rulesengine_bg.wasm +0 -0
  161. package/dist/wasm/rulesengine_bg.wasm.d.ts +25 -0
  162. package/package.json +4 -4
@@ -45,12 +45,13 @@ export declare class PlansClient {
45
45
  * forInitialPlan: true,
46
46
  * forTrialExpiryPlan: true,
47
47
  * hasProductId: true,
48
+ * includeDraftVersions: true,
48
49
  * planType: "plan",
49
50
  * q: "q",
50
51
  * withoutEntitlementFor: "without_entitlement_for",
51
52
  * withoutPaidProductId: true,
52
- * limit: 1,
53
- * offset: 1
53
+ * limit: 1000000,
54
+ * offset: 1000000
54
55
  * })
55
56
  */
56
57
  listPlans(request?: Schematic.ListPlansRequest, requestOptions?: PlansClient.RequestOptions): core.HttpResponsePromise<Schematic.ListPlansResponse>;
@@ -160,12 +161,13 @@ export declare class PlansClient {
160
161
  * forInitialPlan: true,
161
162
  * forTrialExpiryPlan: true,
162
163
  * hasProductId: true,
164
+ * includeDraftVersions: true,
163
165
  * planType: "plan",
164
166
  * q: "q",
165
167
  * withoutEntitlementFor: "without_entitlement_for",
166
168
  * withoutPaidProductId: true,
167
- * limit: 1,
168
- * offset: 1
169
+ * limit: 1000000,
170
+ * offset: 1000000
169
171
  * })
170
172
  */
171
173
  countPlans(request?: Schematic.CountPlansRequest, requestOptions?: PlansClient.RequestOptions): core.HttpResponsePromise<Schematic.CountPlansResponse>;
@@ -7,12 +7,13 @@ import type * as Schematic from "../../../../index";
7
7
  * forInitialPlan: true,
8
8
  * forTrialExpiryPlan: true,
9
9
  * hasProductId: true,
10
+ * includeDraftVersions: true,
10
11
  * planType: "plan",
11
12
  * q: "q",
12
13
  * withoutEntitlementFor: "without_entitlement_for",
13
14
  * withoutPaidProductId: true,
14
- * limit: 1,
15
- * offset: 1
15
+ * limit: 1000000,
16
+ * offset: 1000000
16
17
  * }
17
18
  */
18
19
  export interface CountPlansRequest {
@@ -26,6 +27,8 @@ export interface CountPlansRequest {
26
27
  /** Filter out plans that do not have a billing product ID */
27
28
  hasProductId?: boolean;
28
29
  ids?: string | string[];
30
+ /** Include billing settings from draft versions for plans which have draft version */
31
+ includeDraftVersions?: boolean;
29
32
  /** Filter by plan type */
30
33
  planType?: Schematic.PlanType;
31
34
  q?: string;
@@ -7,12 +7,13 @@ import type * as Schematic from "../../../../index";
7
7
  * forInitialPlan: true,
8
8
  * forTrialExpiryPlan: true,
9
9
  * hasProductId: true,
10
+ * includeDraftVersions: true,
10
11
  * planType: "plan",
11
12
  * q: "q",
12
13
  * withoutEntitlementFor: "without_entitlement_for",
13
14
  * withoutPaidProductId: true,
14
- * limit: 1,
15
- * offset: 1
15
+ * limit: 1000000,
16
+ * offset: 1000000
16
17
  * }
17
18
  */
18
19
  export interface ListPlansRequest {
@@ -26,6 +27,8 @@ export interface ListPlansRequest {
26
27
  /** Filter out plans that do not have a billing product ID */
27
28
  hasProductId?: boolean;
28
29
  ids?: string | string[];
30
+ /** Include billing settings from draft versions for plans which have draft version */
31
+ includeDraftVersions?: boolean;
29
32
  /** Filter by plan type */
30
33
  planType?: Schematic.PlanType;
31
34
  q?: string;
@@ -0,0 +1,2 @@
1
+ export { PlansClient } from "./client/Client";
2
+ export * from "./client/index";
@@ -13,6 +13,8 @@ export interface CountPlansParams {
13
13
  /** Filter out plans that do not have a billing product ID */
14
14
  hasProductId?: boolean;
15
15
  ids?: string[];
16
+ /** Include billing settings from draft versions for plans which have draft version */
17
+ includeDraftVersions?: boolean;
16
18
  /** Page limit (default 100) */
17
19
  limit?: number;
18
20
  /** Page offset (default 0) */
@@ -13,6 +13,8 @@ export interface ListPlansParams {
13
13
  /** Filter out plans that do not have a billing product ID */
14
14
  hasProductId?: boolean;
15
15
  ids?: string[];
16
+ /** Include billing settings from draft versions for plans which have draft version */
17
+ includeDraftVersions?: boolean;
16
18
  /** Page limit (default 100) */
17
19
  limit?: number;
18
20
  /** Page offset (default 0) */
@@ -24,8 +24,8 @@ export declare class ScheduledcheckoutClient {
24
24
  * await client.scheduledcheckout.listScheduledCheckouts({
25
25
  * companyId: "company_id",
26
26
  * status: "cancelled",
27
- * limit: 1,
28
- * offset: 1
27
+ * limit: 1000000,
28
+ * offset: 1000000
29
29
  * })
30
30
  */
31
31
  listScheduledCheckouts(request?: Schematic.ListScheduledCheckoutsRequest, requestOptions?: ScheduledcheckoutClient.RequestOptions): core.HttpResponsePromise<Schematic.ListScheduledCheckoutsResponse>;
@@ -4,8 +4,8 @@ import type * as Schematic from "../../../../index";
4
4
  * {
5
5
  * companyId: "company_id",
6
6
  * status: "cancelled",
7
- * limit: 1,
8
- * offset: 1
7
+ * limit: 1000000,
8
+ * offset: 1000000
9
9
  * }
10
10
  */
11
11
  export interface ListScheduledCheckoutsRequest {
@@ -0,0 +1,2 @@
1
+ export { ScheduledcheckoutClient } from "./client/Client";
2
+ export * from "./client/index";
@@ -24,8 +24,8 @@ export declare class WebhooksClient {
24
24
  * await client.webhooks.listWebhookEvents({
25
25
  * q: "q",
26
26
  * webhookId: "webhook_id",
27
- * limit: 1,
28
- * offset: 1
27
+ * limit: 1000000,
28
+ * offset: 1000000
29
29
  * })
30
30
  */
31
31
  listWebhookEvents(request?: Schematic.ListWebhookEventsRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schematic.ListWebhookEventsResponse>;
@@ -58,8 +58,8 @@ export declare class WebhooksClient {
58
58
  * await client.webhooks.countWebhookEvents({
59
59
  * q: "q",
60
60
  * webhookId: "webhook_id",
61
- * limit: 1,
62
- * offset: 1
61
+ * limit: 1000000,
62
+ * offset: 1000000
63
63
  * })
64
64
  */
65
65
  countWebhookEvents(request?: Schematic.CountWebhookEventsRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schematic.CountWebhookEventsResponse>;
@@ -77,8 +77,8 @@ export declare class WebhooksClient {
77
77
  * @example
78
78
  * await client.webhooks.listWebhooks({
79
79
  * q: "q",
80
- * limit: 1,
81
- * offset: 1
80
+ * limit: 1000000,
81
+ * offset: 1000000
82
82
  * })
83
83
  */
84
84
  listWebhooks(request?: Schematic.ListWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schematic.ListWebhooksResponse>;
@@ -160,8 +160,8 @@ export declare class WebhooksClient {
160
160
  * @example
161
161
  * await client.webhooks.countWebhooks({
162
162
  * q: "q",
163
- * limit: 1,
164
- * offset: 1
163
+ * limit: 1000000,
164
+ * offset: 1000000
165
165
  * })
166
166
  */
167
167
  countWebhooks(request?: Schematic.CountWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schematic.CountWebhooksResponse>;
@@ -3,8 +3,8 @@
3
3
  * {
4
4
  * q: "q",
5
5
  * webhookId: "webhook_id",
6
- * limit: 1,
7
- * offset: 1
6
+ * limit: 1000000,
7
+ * offset: 1000000
8
8
  * }
9
9
  */
10
10
  export interface CountWebhookEventsRequest {
@@ -2,8 +2,8 @@
2
2
  * @example
3
3
  * {
4
4
  * q: "q",
5
- * limit: 1,
6
- * offset: 1
5
+ * limit: 1000000,
6
+ * offset: 1000000
7
7
  * }
8
8
  */
9
9
  export interface CountWebhooksRequest {
@@ -3,8 +3,8 @@
3
3
  * {
4
4
  * q: "q",
5
5
  * webhookId: "webhook_id",
6
- * limit: 1,
7
- * offset: 1
6
+ * limit: 1000000,
7
+ * offset: 1000000
8
8
  * }
9
9
  */
10
10
  export interface ListWebhookEventsRequest {
@@ -2,8 +2,8 @@
2
2
  * @example
3
3
  * {
4
4
  * q: "q",
5
- * limit: 1,
6
- * offset: 1
5
+ * limit: 1000000,
6
+ * offset: 1000000
7
7
  * }
8
8
  */
9
9
  export interface ListWebhooksRequest {
@@ -0,0 +1,2 @@
1
+ export { WebhooksClient } from "./client/Client";
2
+ export * from "./client/index";
@@ -1,7 +1,7 @@
1
1
  export interface CaptureRawEvent {
2
2
  capturedAt: Date;
3
3
  eventId?: string;
4
- rawBytes: number[];
4
+ rawBytes: string;
5
5
  remoteIp: string;
6
6
  userAgent: string;
7
7
  }
@@ -4,7 +4,6 @@ export interface ConditionGroupResponseData {
4
4
  environmentId: string;
5
5
  flagId?: string;
6
6
  id: string;
7
- planVersionId?: string;
8
7
  ruleId: string;
9
8
  updatedAt: Date;
10
9
  }
@@ -6,7 +6,6 @@ export interface ConditionGroupView {
6
6
  environmentId: string;
7
7
  flagId?: string;
8
8
  id: string;
9
- planVersionId?: string;
10
9
  ruleId: string;
11
10
  updatedAt: Date;
12
11
  }
@@ -15,7 +15,6 @@ export interface ConditionResponseData {
15
15
  metricPeriodMonthReset?: string;
16
16
  metricValue?: number;
17
17
  operator: string;
18
- planVersionId?: string;
19
18
  resourceUnspecifiedIds: string[];
20
19
  ruleId: string;
21
20
  traitEntityType?: Schematic.EntityType;
@@ -18,7 +18,6 @@ export interface ConditionView {
18
18
  metricPeriodMonthReset?: string;
19
19
  metricValue?: number;
20
20
  operator: string;
21
- planVersionId?: string;
22
21
  planVersions: Schematic.GenericPreviewObject[];
23
22
  plans: Schematic.GenericPreviewObject[];
24
23
  resourceUnspecifiedIds: string[];
@@ -0,0 +1,7 @@
1
+ import type * as Schematic from "../index";
2
+ export interface DataEventPayload {
3
+ apiKey: string;
4
+ body?: Record<string, unknown>;
5
+ sentAt?: Date;
6
+ type: Schematic.EventType;
7
+ }
@@ -3,6 +3,7 @@ export interface ManagePlanRequest {
3
3
  addOnSelections: Schematic.PlanSelection[];
4
4
  basePlanId?: string;
5
5
  basePlanPriceId?: string;
6
+ basePlanVersionId?: string;
6
7
  /** If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true. */
7
8
  cancelImmediately?: boolean;
8
9
  companyId: string;
@@ -1,4 +1,5 @@
1
1
  export interface PlanSelection {
2
2
  planId: string;
3
3
  priceId?: string;
4
+ versionId?: string;
4
5
  }
@@ -8,7 +8,6 @@ export interface RuleView {
8
8
  flagId?: string;
9
9
  id: string;
10
10
  name: string;
11
- planVersionId?: string;
12
11
  priority: number;
13
12
  ruleType: string;
14
13
  updatedAt: Date;
@@ -1,6 +1,6 @@
1
1
  /** The current schema version hash for rules engine types. The first enum value is always the current version. */
2
2
  export declare const RulesEngineSchemaVersion: {
3
- readonly V0F048Dd3: "v0f048dd3";
3
+ readonly V5F633Cc3: "v5f633cc3";
4
4
  readonly PlaceholderForFernCompatibility: "placeholder-for-fern-compatibility";
5
5
  };
6
6
  export type RulesEngineSchemaVersion = (typeof RulesEngineSchemaVersion)[keyof typeof RulesEngineSchemaVersion];
@@ -0,0 +1,10 @@
1
+ import type * as Schematic from "../index";
2
+ export interface WebScheduledDowngradeWebhookOutput {
3
+ company?: Schematic.CompanyResponseData;
4
+ executeAfter: Date;
5
+ fromPlan?: Schematic.PlanSnapshotView;
6
+ id: string;
7
+ scheduledInterval?: string;
8
+ scheduledPrice?: number;
9
+ toPlan?: Schematic.PlanSnapshotView;
10
+ }
@@ -7,6 +7,7 @@ export declare const WebhookRequestType: {
7
7
  readonly CompanyOverrideExpired: "company.override.expired";
8
8
  readonly CompanyOverrideUpdated: "company.override.updated";
9
9
  readonly CompanyPlanChanged: "company.plan_changed";
10
+ readonly CompanyScheduledDowngrade: "company.scheduled_downgrade";
10
11
  readonly CompanyUpdated: "company.updated";
11
12
  readonly CreditLimitReached: "credit.limit.reached";
12
13
  readonly CreditLimitWarning: "credit.limit.warning";
@@ -136,6 +136,7 @@ export * from "./CreditUsage";
136
136
  export * from "./CreditUsageAggregation";
137
137
  export * from "./CustomPlanConfig";
138
138
  export * from "./CustomPlanViewConfigResponseData";
139
+ export * from "./DataEventPayload";
139
140
  export * from "./DataExportOutputFileType";
140
141
  export * from "./DataExportResponseData";
141
142
  export * from "./DataExportStatus";
@@ -328,4 +329,5 @@ export * from "./WebhookEventStatus";
328
329
  export * from "./WebhookRequestType";
329
330
  export * from "./WebhookResponseData";
330
331
  export * from "./WebhookStatus";
332
+ export * from "./WebScheduledDowngradeWebhookOutput";
331
333
  export * from "./WhoAmIResponseData";
@@ -1,16 +1,20 @@
1
1
  import * as core from "../core";
2
- export declare namespace HeaderAuthProvider {
3
- interface AuthOptions {
4
- apiKey: core.Supplier<string>;
5
- }
6
- interface Options extends AuthOptions {
7
- }
8
- }
2
+ declare const PARAM_KEY: "apiKey";
9
3
  export declare class HeaderAuthProvider implements core.AuthProvider {
10
- private readonly headerValue;
4
+ private readonly options;
11
5
  constructor(options: HeaderAuthProvider.Options);
12
- static canCreate(options: HeaderAuthProvider.Options): boolean;
13
- getAuthRequest(_arg?: {
6
+ static canCreate(options: Partial<HeaderAuthProvider.Options>): boolean;
7
+ getAuthRequest({ endpointMetadata, }?: {
14
8
  endpointMetadata?: core.EndpointMetadata;
15
9
  }): Promise<core.AuthRequest>;
16
10
  }
11
+ export declare namespace HeaderAuthProvider {
12
+ const AUTH_SCHEME: "ApiKeyAuth";
13
+ const AUTH_CONFIG_ERROR_MESSAGE: string;
14
+ type Options = AuthOptions;
15
+ type AuthOptions = {
16
+ [PARAM_KEY]: core.Supplier<string>;
17
+ };
18
+ function createInstance(options: Options): core.AuthProvider;
19
+ }
20
+ export {};
@@ -14,6 +14,6 @@ export type BinaryResponse = {
14
14
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes)
15
15
  * Some versions of the Fetch API may not support this method.
16
16
  */
17
- bytes?(): ReturnType<Response["bytes"]>;
17
+ bytes?(): Promise<Uint8Array>;
18
18
  };
19
19
  export declare function getBinaryResponse(response: Response): BinaryResponse;
@@ -1,12 +1,12 @@
1
1
  import type { EndpointMetadata } from "./EndpointMetadata";
2
2
  import type { Supplier } from "./Supplier";
3
3
  type EndpointSupplierFn<T> = (arg: {
4
- endpointMetadata: EndpointMetadata;
4
+ endpointMetadata?: EndpointMetadata;
5
5
  }) => T | Promise<T>;
6
6
  export type EndpointSupplier<T> = Supplier<T> | EndpointSupplierFn<T>;
7
7
  export declare const EndpointSupplier: {
8
8
  get: <T>(supplier: EndpointSupplier<T>, arg: {
9
- endpointMetadata: EndpointMetadata;
9
+ endpointMetadata?: EndpointMetadata;
10
10
  }) => Promise<T>;
11
11
  };
12
12
  export {};
@@ -1,14 +1,13 @@
1
1
  import { type LogConfig, type Logger } from "../logging/logger";
2
2
  import type { APIResponse } from "./APIResponse";
3
3
  import type { EndpointMetadata } from "./EndpointMetadata";
4
- import { EndpointSupplier } from "./EndpointSupplier";
5
4
  export type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
6
5
  export declare namespace Fetcher {
7
6
  interface Args {
8
7
  url: string;
9
8
  method: string;
10
9
  contentType?: string;
11
- headers?: Record<string, string | EndpointSupplier<string | null | undefined> | null | undefined>;
10
+ headers?: Record<string, unknown>;
12
11
  queryParameters?: Record<string, unknown>;
13
12
  body?: unknown;
14
13
  timeoutMs?: number;
@@ -6,6 +6,8 @@ export type { Fetcher, FetchFunction } from "./Fetcher";
6
6
  export { fetcher } from "./Fetcher";
7
7
  export { getHeader } from "./getHeader";
8
8
  export { HttpResponsePromise } from "./HttpResponsePromise";
9
+ export type { PassthroughRequest } from "./makePassthroughRequest";
10
+ export { makePassthroughRequest } from "./makePassthroughRequest";
9
11
  export type { RawResponse, WithRawResponse } from "./RawResponse";
10
12
  export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse";
11
13
  export { Supplier } from "./Supplier";
@@ -0,0 +1,49 @@
1
+ import { type LogConfig, type Logger } from "../logging/logger";
2
+ import { Supplier } from "./Supplier";
3
+ export declare namespace PassthroughRequest {
4
+ /**
5
+ * Per-request options that can override the SDK client defaults.
6
+ */
7
+ interface RequestOptions {
8
+ /** Override the default timeout for this request (in seconds). */
9
+ timeoutInSeconds?: number;
10
+ /** Override the default number of retries for this request. */
11
+ maxRetries?: number;
12
+ /** Additional headers to include in this request. */
13
+ headers?: Record<string, string>;
14
+ /** Abort signal for this request. */
15
+ abortSignal?: AbortSignal;
16
+ }
17
+ /**
18
+ * SDK client configuration used by the passthrough fetch method.
19
+ */
20
+ interface ClientOptions {
21
+ /** The base URL or environment for the client. */
22
+ environment?: Supplier<string>;
23
+ /** Override the base URL. */
24
+ baseUrl?: Supplier<string>;
25
+ /** Default headers to include in requests. */
26
+ headers?: Record<string, unknown>;
27
+ /** Default maximum time to wait for a response in seconds. */
28
+ timeoutInSeconds?: number;
29
+ /** Default number of times to retry the request. Defaults to 2. */
30
+ maxRetries?: number;
31
+ /** A custom fetch function. */
32
+ fetch?: typeof fetch;
33
+ /** Logging configuration. */
34
+ logging?: LogConfig | Logger;
35
+ /** A function that returns auth headers. */
36
+ getAuthHeaders?: () => Promise<Record<string, string>>;
37
+ }
38
+ }
39
+ /**
40
+ * Makes a passthrough HTTP request using the SDK's configuration (auth, retry, logging, etc.)
41
+ * while mimicking the standard `fetch` API.
42
+ *
43
+ * @param input - The URL, path, or Request object. If a relative path, it will be resolved against the configured base URL.
44
+ * @param init - Standard RequestInit options (method, headers, body, signal, etc.)
45
+ * @param clientOptions - SDK client options (auth, default headers, logging, etc.)
46
+ * @param requestOptions - Per-request overrides (timeout, retries, extra headers, abort signal).
47
+ * @returns A standard Response object.
48
+ */
49
+ export declare function makePassthroughRequest(input: Request | string | URL, init: RequestInit | undefined, clientOptions: PassthroughRequest.ClientOptions, requestOptions?: PassthroughRequest.RequestOptions): Promise<Response>;
@@ -1 +1,6 @@
1
- export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Headers | Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number, abortSignal?: AbortSignal, withCredentials?: boolean, duplex?: "half") => Promise<Response>;
1
+ export declare function isCacheNoStoreSupported(): boolean;
2
+ /**
3
+ * Reset the cached result of `isCacheNoStoreSupported`. Exposed for testing only.
4
+ */
5
+ export declare function resetCacheNoStoreSupported(): void;
6
+ export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Headers | Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number, abortSignal?: AbortSignal, withCredentials?: boolean, duplex?: "half", disableCache?: boolean) => Promise<Response>;
@@ -1,2 +1,2 @@
1
- export declare function mergeHeaders<THeaderValue>(...headersArray: (Record<string, THeaderValue> | null | undefined)[]): Record<string, string | THeaderValue>;
2
- export declare function mergeOnlyDefinedHeaders<THeaderValue>(...headersArray: (Record<string, THeaderValue> | null | undefined)[]): Record<string, THeaderValue>;
1
+ export declare function mergeHeaders(...headersArray: (Record<string, unknown> | null | undefined)[]): Record<string, unknown>;
2
+ export declare function mergeOnlyDefinedHeaders(...headersArray: (Record<string, unknown> | null | undefined)[]): Record<string, unknown>;
@@ -1,2 +1,2 @@
1
- export { record } from "./record";
2
- export type { BaseRecordSchema, RecordSchema } from "./types";
1
+ export { partialRecord, record } from "./record";
2
+ export type { BasePartialRecordSchema, BaseRecordSchema, PartialRecordSchema, RecordSchema } from "./types";
@@ -1,3 +1,4 @@
1
1
  import { type Schema } from "../../Schema";
2
- import type { RecordSchema } from "./types";
2
+ import type { PartialRecordSchema, RecordSchema } from "./types";
3
3
  export declare function record<RawKey extends string | number, RawValue, ParsedValue, ParsedKey extends string | number>(keySchema: Schema<RawKey, ParsedKey>, valueSchema: Schema<RawValue, ParsedValue>): RecordSchema<RawKey, RawValue, ParsedKey, ParsedValue>;
4
+ export declare function partialRecord<RawKey extends string | number, RawValue, ParsedValue, ParsedKey extends string | number>(keySchema: Schema<RawKey, ParsedKey>, valueSchema: Schema<RawValue, ParsedValue>): PartialRecordSchema<RawKey, RawValue, ParsedKey, ParsedValue>;
@@ -2,3 +2,5 @@ import type { BaseSchema } from "../../Schema";
2
2
  import type { SchemaUtils } from "../schema-utils/index";
3
3
  export type RecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BaseRecordSchema<RawKey, RawValue, ParsedKey, ParsedValue> & SchemaUtils<Record<RawKey, RawValue>, Record<ParsedKey, ParsedValue>>;
4
4
  export type BaseRecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BaseSchema<Record<RawKey, RawValue>, Record<ParsedKey, ParsedValue>>;
5
+ export type PartialRecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BasePartialRecordSchema<RawKey, RawValue, ParsedKey, ParsedValue> & SchemaUtils<Record<RawKey, RawValue>, Partial<Record<ParsedKey, ParsedValue>>>;
6
+ export type BasePartialRecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BaseSchema<Record<RawKey, RawValue>, Partial<Record<ParsedKey, ParsedValue>>>;
@@ -0,0 +1,30 @@
1
+ import type * as Schematic from "../api/types";
2
+ /**
3
+ * Creates a complete deep copy of a Company object.
4
+ */
5
+ export declare function deepCopyCompany(c: Schematic.RulesengineCompany): Schematic.RulesengineCompany;
6
+ /**
7
+ * Creates a complete deep copy of a User object.
8
+ */
9
+ export declare function deepCopyUser(u: Schematic.RulesengineUser): Schematic.RulesengineUser;
10
+ /**
11
+ * Extracts the "id" field from a parsed datastream message data object.
12
+ * Throws if the id field is missing or empty.
13
+ */
14
+ export declare function extractIdFromData(data: Record<string, unknown>): string;
15
+ /**
16
+ * Merges a partial update into an existing Company.
17
+ * Deep-copies the existing company, then applies only the fields
18
+ * present in the partial object. The "id" field must be present.
19
+ *
20
+ * Wire format uses snake_case keys. The existing company from cache
21
+ * may have either camelCase or snake_case keys depending on how it
22
+ * was stored.
23
+ */
24
+ export declare function partialCompany(existing: Schematic.RulesengineCompany, partial: Record<string, unknown>): Schematic.RulesengineCompany;
25
+ /**
26
+ * Merges a partial update into an existing User.
27
+ * Deep-copies the existing user, then applies only the fields
28
+ * present in the partial object. The "id" field must be present.
29
+ */
30
+ export declare function partialUser(existing: Schematic.RulesengineUser, partial: Record<string, unknown>): Schematic.RulesengineUser;