@schematichq/schematic-typescript-node 1.5.13 → 1.6.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.
Files changed (40) hide show
  1. package/dist/api/resources/credits/client/Client.d.ts +41 -5
  2. package/dist/api/resources/credits/client/requests/ReserveCreditsRequestBody.d.ts +18 -0
  3. package/dist/api/resources/credits/client/requests/index.d.ts +1 -0
  4. package/dist/api/resources/credits/types/ReleaseCreditReservationResponse.d.ts +6 -0
  5. package/dist/api/resources/credits/types/ReserveCreditsResponse.d.ts +6 -0
  6. package/dist/api/resources/credits/types/index.d.ts +2 -0
  7. package/dist/api/resources/features/client/Client.d.ts +18 -0
  8. package/dist/api/resources/features/client/requests/CheckAndReserveFlagRequestBody.d.ts +15 -0
  9. package/dist/api/resources/features/client/requests/index.d.ts +1 -0
  10. package/dist/api/resources/features/types/CheckAndReserveFlagResponse.d.ts +6 -0
  11. package/dist/api/resources/features/types/index.d.ts +1 -0
  12. package/dist/api/types/CheckAndReserveFlagResponseData.d.ts +35 -0
  13. package/dist/api/types/CreditReservationResponseData.d.ts +15 -0
  14. package/dist/api/types/CreditUsageReason.d.ts +2 -0
  15. package/dist/api/types/EventBodyTrack.d.ts +2 -0
  16. package/dist/api/types/EventDetailResponseData.d.ts +1 -0
  17. package/dist/api/types/EventResponseData.d.ts +1 -0
  18. package/dist/api/types/FlagCheckReservationResponseData.d.ts +15 -0
  19. package/dist/api/types/index.d.ts +3 -1
  20. package/dist/index.js +9 -9
  21. package/dist/serialization/resources/credits/client/requests/ReserveCreditsRequestBody.d.ts +13 -0
  22. package/dist/serialization/resources/credits/client/requests/index.d.ts +1 -0
  23. package/dist/serialization/resources/credits/types/ReleaseCreditReservationResponse.d.ts +11 -0
  24. package/dist/serialization/resources/credits/types/ReserveCreditsResponse.d.ts +11 -0
  25. package/dist/serialization/resources/credits/types/index.d.ts +2 -0
  26. package/dist/serialization/resources/features/client/requests/CheckAndReserveFlagRequestBody.d.ts +14 -0
  27. package/dist/serialization/resources/features/client/requests/index.d.ts +1 -0
  28. package/dist/serialization/resources/features/types/CheckAndReserveFlagResponse.d.ts +11 -0
  29. package/dist/serialization/resources/features/types/index.d.ts +1 -0
  30. package/dist/serialization/types/CheckAndReserveFlagResponseData.d.ts +28 -0
  31. package/dist/serialization/types/CreditReservationResponseData.d.ts +17 -0
  32. package/dist/serialization/types/CreditUsageReason.d.ts +1 -1
  33. package/dist/serialization/types/EventBodyTrack.d.ts +1 -0
  34. package/dist/serialization/types/EventDetailResponseData.d.ts +1 -0
  35. package/dist/serialization/types/EventResponseData.d.ts +1 -0
  36. package/dist/serialization/types/FlagCheckReservationResponseData.d.ts +16 -0
  37. package/dist/serialization/types/index.d.ts +3 -1
  38. package/package.json +5 -1
  39. package/dist/api/types/ReleaseCreditLeaseRequestBody.d.ts +0 -1
  40. package/dist/serialization/types/ReleaseCreditLeaseRequestBody.d.ts +0 -7
@@ -0,0 +1,13 @@
1
+ import type * as Schematic from "../../../../../api/index";
2
+ import * as core from "../../../../../core";
3
+ import type * as serializers from "../../../../index";
4
+ export declare const ReserveCreditsRequestBody: core.serialization.Schema<serializers.ReserveCreditsRequestBody.Raw, Schematic.ReserveCreditsRequestBody>;
5
+ export declare namespace ReserveCreditsRequestBody {
6
+ interface Raw {
7
+ amount: number;
8
+ company_id: string;
9
+ credit_type_id: string;
10
+ expires_at?: string | null;
11
+ idempotency_key?: string | null;
12
+ }
13
+ }
@@ -4,6 +4,7 @@ export { CreateCompanyCreditGrant } from "./CreateCompanyCreditGrant";
4
4
  export { CreateCreditBundleRequestBody } from "./CreateCreditBundleRequestBody";
5
5
  export { CreateCreditSpendPolicyRequestBody } from "./CreateCreditSpendPolicyRequestBody";
6
6
  export { ExtendCreditLeaseRequestBody } from "./ExtendCreditLeaseRequestBody";
7
+ export { ReserveCreditsRequestBody } from "./ReserveCreditsRequestBody";
7
8
  export { UpdateBillingCreditRequestBody } from "./UpdateBillingCreditRequestBody";
8
9
  export { UpdateCreditBundleDetailsRequestBody } from "./UpdateCreditBundleDetailsRequestBody";
9
10
  export { UpdateCreditSpendPolicyRequestBody } from "./UpdateCreditSpendPolicyRequestBody";
@@ -0,0 +1,11 @@
1
+ import type * as Schematic from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ import { CreditReservationResponseData } from "../../../types/CreditReservationResponseData";
5
+ export declare const ReleaseCreditReservationResponse: core.serialization.ObjectSchema<serializers.ReleaseCreditReservationResponse.Raw, Schematic.ReleaseCreditReservationResponse>;
6
+ export declare namespace ReleaseCreditReservationResponse {
7
+ interface Raw {
8
+ data: CreditReservationResponseData.Raw;
9
+ params: Record<string, unknown>;
10
+ }
11
+ }
@@ -0,0 +1,11 @@
1
+ import type * as Schematic from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ import { CreditReservationResponseData } from "../../../types/CreditReservationResponseData";
5
+ export declare const ReserveCreditsResponse: core.serialization.ObjectSchema<serializers.ReserveCreditsResponse.Raw, Schematic.ReserveCreditsResponse>;
6
+ export declare namespace ReserveCreditsResponse {
7
+ interface Raw {
8
+ data: CreditReservationResponseData.Raw;
9
+ params: Record<string, unknown>;
10
+ }
11
+ }
@@ -44,6 +44,8 @@ export * from "./ListCreditSpendPoliciesResponse";
44
44
  export * from "./ListGrantsForCreditParams";
45
45
  export * from "./ListGrantsForCreditResponse";
46
46
  export * from "./ReleaseCreditLeaseResponse";
47
+ export * from "./ReleaseCreditReservationResponse";
48
+ export * from "./ReserveCreditsResponse";
47
49
  export * from "./SoftDeleteBillingCreditResponse";
48
50
  export * from "./UpdateBillingCreditResponse";
49
51
  export * from "./UpdateBillingPlanCreditGrantResponse";
@@ -0,0 +1,14 @@
1
+ import type * as Schematic from "../../../../../api/index";
2
+ import * as core from "../../../../../core";
3
+ import type * as serializers from "../../../../index";
4
+ import { PreflightRequestBody } from "../../../../types/PreflightRequestBody";
5
+ export declare const CheckAndReserveFlagRequestBody: core.serialization.Schema<serializers.CheckAndReserveFlagRequestBody.Raw, Schematic.CheckAndReserveFlagRequestBody>;
6
+ export declare namespace CheckAndReserveFlagRequestBody {
7
+ interface Raw {
8
+ company?: Record<string, string> | null;
9
+ expires_at?: string | null;
10
+ preflight?: PreflightRequestBody.Raw | null;
11
+ quantity?: number | null;
12
+ user?: Record<string, string> | null;
13
+ }
14
+ }
@@ -1,3 +1,4 @@
1
+ export { CheckAndReserveFlagRequestBody } from "./CheckAndReserveFlagRequestBody";
1
2
  export { CheckFlagsBulkRequestBody } from "./CheckFlagsBulkRequestBody";
2
3
  export { CreateBillingLinkedFeatureRequestBody } from "./CreateBillingLinkedFeatureRequestBody";
3
4
  export { CreateFeatureRequestBody } from "./CreateFeatureRequestBody";
@@ -0,0 +1,11 @@
1
+ import type * as Schematic from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ import { CheckAndReserveFlagResponseData } from "../../../types/CheckAndReserveFlagResponseData";
5
+ export declare const CheckAndReserveFlagResponse: core.serialization.ObjectSchema<serializers.CheckAndReserveFlagResponse.Raw, Schematic.CheckAndReserveFlagResponse>;
6
+ export declare namespace CheckAndReserveFlagResponse {
7
+ interface Raw {
8
+ data: CheckAndReserveFlagResponseData.Raw;
9
+ params: Record<string, unknown>;
10
+ }
11
+ }
@@ -1,3 +1,4 @@
1
+ export * from "./CheckAndReserveFlagResponse";
1
2
  export * from "./CheckFlagResponse";
2
3
  export * from "./CheckFlagsBulkResponse";
3
4
  export * from "./CheckFlagsResponse";
@@ -0,0 +1,28 @@
1
+ import type * as Schematic from "../../api/index";
2
+ import * as core from "../../core";
3
+ import type * as serializers from "../index";
4
+ import { FeatureEntitlement } from "./FeatureEntitlement";
5
+ import { FlagCheckReservationResponseData } from "./FlagCheckReservationResponseData";
6
+ import { MetricPeriod } from "./MetricPeriod";
7
+ import { RuleType } from "./RuleType";
8
+ export declare const CheckAndReserveFlagResponseData: core.serialization.ObjectSchema<serializers.CheckAndReserveFlagResponseData.Raw, Schematic.CheckAndReserveFlagResponseData>;
9
+ export declare namespace CheckAndReserveFlagResponseData {
10
+ interface Raw {
11
+ company_id?: string | null;
12
+ entitlement?: FeatureEntitlement.Raw | null;
13
+ error?: string | null;
14
+ feature_allocation?: number | null;
15
+ feature_usage?: number | null;
16
+ feature_usage_event?: string | null;
17
+ feature_usage_period?: MetricPeriod.Raw | null;
18
+ feature_usage_reset_at?: string | null;
19
+ flag: string;
20
+ flag_id?: string | null;
21
+ reason: string;
22
+ reservation?: FlagCheckReservationResponseData.Raw | null;
23
+ rule_id?: string | null;
24
+ rule_type?: RuleType.Raw | null;
25
+ user_id?: string | null;
26
+ value: boolean;
27
+ }
28
+ }
@@ -0,0 +1,17 @@
1
+ import type * as Schematic from "../../api/index";
2
+ import * as core from "../../core";
3
+ import type * as serializers from "../index";
4
+ export declare const CreditReservationResponseData: core.serialization.ObjectSchema<serializers.CreditReservationResponseData.Raw, Schematic.CreditReservationResponseData>;
5
+ export declare namespace CreditReservationResponseData {
6
+ interface Raw {
7
+ company_id: string;
8
+ created_at: string;
9
+ credit_type_id: string;
10
+ expires_at: string;
11
+ id: string;
12
+ released_at?: string | null;
13
+ reserved_amount: number;
14
+ settled_amount: number;
15
+ updated_at: string;
16
+ }
17
+ }
@@ -3,5 +3,5 @@ import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
4
  export declare const CreditUsageReason: core.serialization.Schema<serializers.CreditUsageReason.Raw, Schematic.CreditUsageReason>;
5
5
  export declare namespace CreditUsageReason {
6
- type Raw = "lease_hold" | "lease_release" | "manual_adjustment" | "reconciliation" | "track";
6
+ type Raw = "lease_hold" | "lease_release" | "manual_adjustment" | "reconciliation" | "reservation_hold" | "reservation_release" | "track";
7
7
  }
@@ -8,6 +8,7 @@ export declare namespace EventBodyTrack {
8
8
  event: string;
9
9
  lease_id?: string | null;
10
10
  quantity?: number | null;
11
+ reservation_id?: string | null;
11
12
  traits?: Record<string, unknown> | null;
12
13
  user?: Record<string, string> | null;
13
14
  }
@@ -26,6 +26,7 @@ export declare namespace EventDetailResponseData {
26
26
  loaded_at?: string | null;
27
27
  processed_at?: string | null;
28
28
  quantity: number;
29
+ reservation_id?: string | null;
29
30
  sent_at?: string | null;
30
31
  status: EventStatus.Raw;
31
32
  subtype?: string | null;
@@ -21,6 +21,7 @@ export declare namespace EventResponseData {
21
21
  loaded_at?: string | null;
22
22
  processed_at?: string | null;
23
23
  quantity: number;
24
+ reservation_id?: string | null;
24
25
  sent_at?: string | null;
25
26
  status: EventStatus.Raw;
26
27
  subtype?: string | null;
@@ -0,0 +1,16 @@
1
+ import type * as Schematic from "../../api/index";
2
+ import * as core from "../../core";
3
+ import type * as serializers from "../index";
4
+ export declare const FlagCheckReservationResponseData: core.serialization.ObjectSchema<serializers.FlagCheckReservationResponseData.Raw, Schematic.FlagCheckReservationResponseData>;
5
+ export declare namespace FlagCheckReservationResponseData {
6
+ interface Raw {
7
+ company_id: string;
8
+ consumption_rate: number;
9
+ credit_type_id: string;
10
+ credits_reserved: number;
11
+ event_subtype?: string | null;
12
+ expires_at: string;
13
+ id: string;
14
+ quantity_reserved: number;
15
+ }
16
+ }
@@ -79,6 +79,7 @@ export * from "./CatalogResponseData";
79
79
  export * from "./ChangeSubscriptionInternalRequestBody";
80
80
  export * from "./ChangeSubscriptionRequestBody";
81
81
  export * from "./ChargeType";
82
+ export * from "./CheckAndReserveFlagResponseData";
82
83
  export * from "./CheckFlagRequestBody";
83
84
  export * from "./CheckFlagResponseData";
84
85
  export * from "./CheckFlagsBulkResponseData";
@@ -169,6 +170,7 @@ export * from "./CreditGrantDetail";
169
170
  export * from "./CreditGrantExpiryRequestBody";
170
171
  export * from "./CreditGrantSortOrder";
171
172
  export * from "./CreditLeaseResponseData";
173
+ export * from "./CreditReservationResponseData";
172
174
  export * from "./CreditSpendPolicyResponseData";
173
175
  export * from "./CreditSpendPolicyScope";
174
176
  export * from "./CreditsAutoTopupCompanySummary";
@@ -251,6 +253,7 @@ export * from "./FeatureUsageLegacyResponseData";
251
253
  export * from "./FeatureUsageResponseData";
252
254
  export * from "./FeatureUsageTimeSeriesResponseData";
253
255
  export * from "./FeatureView";
256
+ export * from "./FlagCheckReservationResponseData";
254
257
  export * from "./FlagDetailResponseData";
255
258
  export * from "./FlagInPlanResponseData";
256
259
  export * from "./FlagResponseData";
@@ -360,7 +363,6 @@ export * from "./PublicPlansResponseData";
360
363
  export * from "./QuickstartResp";
361
364
  export * from "./RawEventBatchResponseData";
362
365
  export * from "./RawEventResponseData";
363
- export * from "./ReleaseCreditLeaseRequestBody";
364
366
  export * from "./Rule";
365
367
  export * from "./RuleConditionDetailResponseData";
366
368
  export * from "./RuleConditionGroupDetailResponseData";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematichq/schematic-typescript-node",
3
- "version": "1.5.13",
3
+ "version": "1.6.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -63,6 +63,10 @@
63
63
  },
64
64
  "sideEffects": false,
65
65
  "license": "MIT",
66
+ "resolutions": {
67
+ "sharp": "^0.35.4",
68
+ "undici": "7.29.0"
69
+ },
66
70
  "files": [
67
71
  "dist/**/*.js",
68
72
  "dist/**/*.d.ts",
@@ -1 +0,0 @@
1
- export type ReleaseCreditLeaseRequestBody = Record<string, unknown>;
@@ -1,7 +0,0 @@
1
- import type * as Schematic from "../../api/index";
2
- import * as core from "../../core";
3
- import type * as serializers from "../index";
4
- export declare const ReleaseCreditLeaseRequestBody: core.serialization.Schema<serializers.ReleaseCreditLeaseRequestBody.Raw, Schematic.ReleaseCreditLeaseRequestBody>;
5
- export declare namespace ReleaseCreditLeaseRequestBody {
6
- type Raw = Record<string, unknown>;
7
- }