@stripe/extensibility-sdk 0.24.0 → 0.25.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 (49) hide show
  1. package/README.md +355 -0
  2. package/dist/config-values/generate.d.ts +2 -0
  3. package/dist/config-values/generate.d.ts.map +1 -1
  4. package/dist/extensibility-sdk-alpha.d.ts +140 -38
  5. package/dist/extensibility-sdk-beta.d.ts +140 -38
  6. package/dist/extensibility-sdk-extensions-alpha.d.ts +155 -25
  7. package/dist/extensibility-sdk-extensions-beta.d.ts +155 -25
  8. package/dist/extensibility-sdk-extensions-internal.d.ts +159 -25
  9. package/dist/extensibility-sdk-extensions-public.d.ts +155 -25
  10. package/dist/extensibility-sdk-internal-alpha.d.ts +5 -0
  11. package/dist/extensibility-sdk-internal-beta.d.ts +5 -0
  12. package/dist/extensibility-sdk-internal-internal.d.ts +5 -0
  13. package/dist/extensibility-sdk-internal-public.d.ts +5 -0
  14. package/dist/extensibility-sdk-internal.d.ts +139 -40
  15. package/dist/extensibility-sdk-public.d.ts +140 -38
  16. package/dist/extensibility-sdk-stdlib-alpha.d.ts +145 -38
  17. package/dist/extensibility-sdk-stdlib-beta.d.ts +145 -38
  18. package/dist/extensibility-sdk-stdlib-internal.d.ts +144 -40
  19. package/dist/extensibility-sdk-stdlib-public.d.ts +145 -38
  20. package/dist/extensions/billing/bill/discount_calculation.d.ts +5 -3
  21. package/dist/extensions/billing/customer_balance_application.d.ts +3 -1
  22. package/dist/extensions/billing/invoice_collection_setting.d.ts +15 -11
  23. package/dist/extensions/billing/prorations.d.ts +30 -21
  24. package/dist/extensions/billing/recurring_billing_item_handling.d.ts +41 -23
  25. package/dist/extensions/billing/types.d.ts +4 -4
  26. package/dist/extensions/core/workflows/custom_action.d.ts +6 -2
  27. package/dist/extensions/extend/workflows/custom_action.d.ts +6 -2
  28. package/dist/index.cjs +385 -134
  29. package/dist/index.js +383 -133
  30. package/dist/internal.d.ts +4 -0
  31. package/dist/internal.d.ts.map +1 -1
  32. package/dist/stdlib/brand.d.ts +16 -10
  33. package/dist/stdlib/brand.d.ts.map +1 -1
  34. package/dist/stdlib/decimal.d.ts +49 -21
  35. package/dist/stdlib/decimal.d.ts.map +1 -1
  36. package/dist/stdlib/index.cjs +385 -134
  37. package/dist/stdlib/index.d.ts +10 -4
  38. package/dist/stdlib/index.d.ts.map +1 -1
  39. package/dist/stdlib/index.js +383 -133
  40. package/dist/stdlib/refs.d.ts +21 -7
  41. package/dist/stdlib/scalars.d.ts +61 -28
  42. package/dist/stdlib/scalars.d.ts.map +1 -1
  43. package/dist/stdlib/to-const.d.ts +35 -0
  44. package/dist/stdlib/to-const.d.ts.map +1 -0
  45. package/dist/stdlib/type-utils.d.ts +3 -1
  46. package/dist/stdlib/types.d.ts +6 -6
  47. package/dist/tsconfig.build.tsbuildinfo +1 -1
  48. package/package.json +11 -11
  49. package/dist/api-surface.d.ts.map +0 -1
@@ -20,15 +20,23 @@ export type Ref<T extends {
20
20
  } = {
21
21
  readonly object: string;
22
22
  }> = {
23
- id: string;
23
+ /** The object tag of the referenced resource (e.g., "v2.core.customer"). */
24
24
  type: ExtractObjectTag<T>;
25
+ /** The ID of the referenced resource. */
26
+ id: string;
25
27
  } & {
26
- readonly __type?: T;
27
28
  readonly [__brand]: 'Ref';
29
+ readonly __type?: T;
28
30
  readonly [__stripeType]: 'string';
29
31
  };
30
32
  /** Factory for creating {@link (Ref:type)} values from an object with `object` and `id` fields. @public */
31
- export declare const Ref: { create: <T extends { readonly object: string }>(step: { readonly id: string } & T) => Ref<T> };
33
+ export declare const Ref: {
34
+ create: <T extends {
35
+ readonly object: string;
36
+ }>(step: T & {
37
+ readonly id: string;
38
+ }) => Ref<T>;
39
+ };
32
40
  /**
33
41
  * A paginated list of references to objects of type T.
34
42
  *
@@ -38,11 +46,17 @@ export type PaginatedRefList<T extends {
38
46
  readonly object: string;
39
47
  } = {
40
48
  readonly object: string;
41
- }> = {
42
- readonly __type?: T;
49
+ }> = Ref<T>[] & {
43
50
  readonly [__brand]: 'PaginatedRefList';
51
+ readonly __type?: T;
44
52
  readonly [__stripeType]: `list<${Ref<T>[StripeTypeSymbol]}>`;
45
- } & Ref<T>[];
53
+ };
46
54
  /** Factory for creating {@link PaginatedRefList} values from an array of {@link Ref} items. @public */
47
- export declare const PaginatedRefList: { create: <T extends { readonly object: string } = { readonly object: string }>(items?: Ref<T>[]) => PaginatedRefList<T> };
55
+ export declare const PaginatedRefList: {
56
+ create: <T extends {
57
+ readonly object: string;
58
+ } = {
59
+ readonly object: string;
60
+ }>(items?: Ref<T>[]) => PaginatedRefList<T>;
61
+ };
48
62
  //# sourceMappingURL=refs.d.ts.map
@@ -1,25 +1,35 @@
1
1
  import { type __integerBrand } from '@formspec/core';
2
2
  import { type __brand, type __stripeType } from './brand.js';
3
+ import { Decimal } from './decimal.js';
3
4
  /** A branded object type representing a JSON map (`map<string>`) in the Stripe type system. @public */
4
- export type JsonObject = {
5
+ export type JsonObject = object & {
5
6
  readonly [__brand]: 'JsonObject';
6
7
  readonly [__stripeType]: 'map<string>';
7
- } & object;
8
+ };
8
9
  /** Factory for creating {@link JsonObject} branded values. @public */
9
- export declare const JsonObject: { create: (value: object) => JsonObject };
10
+ export declare const JsonObject: {
11
+ create: (value: object) => JsonObject;
12
+ };
10
13
  /** A branded integer — a `number` guaranteed to satisfy `Number.isInteger`. @public */
11
- export type Integer = {
14
+ export type Integer = number & {
12
15
  readonly [__integerBrand]: true;
13
16
  readonly [__stripeType]: 'int';
14
- } & number;
17
+ };
15
18
  /**
16
- * Distinct brand for PositiveInteger so an Integer is not assignable to
19
+ * Distinct brand key for PositiveInteger so an Integer is not assignable to
17
20
  * PositiveInteger without going through the guard. PositiveInteger is a
18
21
  * subtype of Integer (it carries both brands), so it can be used wherever
19
22
  * Integer is expected.
20
- * @internal
23
+ *
24
+ * String-literal const (not `unique symbol`) so that independent
25
+ * declaration rollups (root vs subpath) produce structurally compatible
26
+ * branded types.
27
+ *
28
+ * For internal use only — may be removed in a future release.
29
+ *
30
+ * @public
21
31
  */
22
- declare const __positiveIntegerBrand: unique symbol;
32
+ export declare const __positiveIntegerBrand: '__positiveIntegerBrand';
23
33
  /**
24
34
  * A branded non-negative integer — a `number` guaranteed to be an integer ≥ 0.
25
35
  *
@@ -37,11 +47,11 @@ declare const __positiveIntegerBrand: unique symbol;
37
47
  *
38
48
  * @public
39
49
  */
40
- export type PositiveInteger = {
50
+ export type PositiveInteger = number & {
41
51
  readonly [__integerBrand]: true;
42
52
  readonly [__positiveIntegerBrand]: true;
43
53
  readonly [__stripeType]: 'int';
44
- } & number;
54
+ };
45
55
  /**
46
56
  * Rounding directions for coercing a number to an integer.
47
57
  *
@@ -57,30 +67,53 @@ export type PositiveInteger = {
57
67
  *
58
68
  * @public
59
69
  */
60
- export type IntegerRoundDirection = 'ceil' | 'floor' | 'half-up' | 'round-down' | 'round-up';
61
- /** Factory and type guard for {@link (Integer:type)} branded values. @public */
62
- export declare const Integer: {
63
- from: (value: number, rounding: IntegerRoundDirection) => Integer;
64
- is: (value: number) => value is Integer;
65
- };
66
- /** Factory and type guard for {@link (PositiveInteger:type)} branded values. @public */
67
- export declare const PositiveInteger: {
68
- from: (value: number, rounding: IntegerRoundDirection) => PositiveInteger;
69
- is: (value: number) => value is PositiveInteger;
70
- };
70
+ export type IntegerRoundDirection = 'ceil' | 'floor' | 'round-down' | 'round-up' | 'half-up';
71
+ /** @public */
72
+ export interface IntegerCompanion {
73
+ /** The Integer value `0`. @public */
74
+ readonly zero: Integer;
75
+ /** Type guard: narrows `unknown` to {@link (Integer:type)}. @public */
76
+ is(value: unknown): value is Integer;
77
+ /** Assertion guard: throws if not an {@link (Integer:type)}. @public */
78
+ assert(value: unknown): asserts value is Integer;
79
+ /** Coerce a value to {@link (Integer:type)} by rounding. @public */
80
+ from(value: string | number | Decimal | Integer, rounding: IntegerRoundDirection): Integer;
81
+ /** Lossless conversion to `Decimal`. @public */
82
+ toDecimal(value: Integer): Decimal;
83
+ /** Type guard: narrows {@link (Integer:type)} to {@link (PositiveInteger:type)}. @public */
84
+ isPositive(value: Integer): value is PositiveInteger;
85
+ /** Assertion guard: throws if the Integer is negative. @public */
86
+ assertIsPositive(value: Integer): asserts value is PositiveInteger;
87
+ }
88
+ /** Factory, type guard, and utilities for {@link (Integer:type)} branded values. @public */
89
+ export declare const Integer: IntegerCompanion;
90
+ /** @public */
91
+ export interface PositiveIntegerCompanion {
92
+ /** Type guard: narrows `unknown` to {@link (PositiveInteger:type)}. @public */
93
+ is(value: unknown): value is PositiveInteger;
94
+ /** Assertion guard: throws if not a {@link (PositiveInteger:type)}. @public */
95
+ assert(value: unknown): asserts value is PositiveInteger;
96
+ /** Coerce a value to {@link (PositiveInteger:type)} by rounding. Throws if negative. @public */
97
+ from(value: string | number | Decimal | Integer, rounding: IntegerRoundDirection): PositiveInteger;
98
+ }
99
+ /** Factory, type guard, and utilities for {@link (PositiveInteger:type)} branded values. @public */
100
+ export declare const PositiveInteger: PositiveIntegerCompanion;
71
101
  /** A branded string representing a street address. @public */
72
- export type StreetAddress = {
102
+ export type StreetAddress = string & {
73
103
  readonly [__brand]: 'StreetAddress';
74
104
  readonly [__stripeType]: 'string';
75
- } & string;
105
+ };
76
106
  /** Factory for creating {@link (StreetAddress:type)} branded values. @public */
77
- export declare const StreetAddress: { create: (address: string) => StreetAddress };
107
+ export declare const StreetAddress: {
108
+ create: (address: string) => StreetAddress;
109
+ };
78
110
  /** A branded string representing an ISO 8601 datetime. @public */
79
- export type Timestamp = {
111
+ export type Timestamp = string & {
80
112
  readonly [__brand]: 'Timestamp';
81
113
  readonly [__stripeType]: 'string';
82
- } & string;
114
+ };
83
115
  /** Factory for creating {@link (Timestamp:type)} branded values. @public */
84
- export declare const Timestamp: { create: (value: string) => Timestamp };
85
- export {};
116
+ export declare const Timestamp: {
117
+ create: (value: string) => Timestamp;
118
+ };
86
119
  //# sourceMappingURL=scalars.d.ts.map
@@ -1 +1 @@
1
- {"version":3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AAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,eAAe,CAAC;CACpE;AAED,4FAA4F;AAC5F,eAAO,MAAM,OAAO,EAAE,gBAgKrB,CAAC;AAEF,cAAc;AACd,MAAM,WAAW,wBAAwB;IACvC,+EAA+E;IAC/E,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAAC;IAC7C,+EAA+E;IAC/E,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,eAAe,CAAC;IACzD,gGAAgG;IAChG,IAAI,CACF,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,EAC1C,QAAQ,EAAE,qBAAqB,GAC9B,eAAe,CAAC;CACpB;AAED,oGAAoG;AACpG,eAAO,MAAM,eAAe,EAAE,wBAoE7B,CAAC;AAEF,8DAA8D;AAC9D,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG;IACnC,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACpC,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC;CACnC,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,aAAa;sBACN,MAAM,KAAG,aAAa;CAIzC,CAAC;AAEF,kEAAkE;AAClE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG;IAC/B,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;IAEhC,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC;CACnC,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,SAAS;oBACJ,MAAM,KAAG,SAAS;CAInC,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Recursively converts a type to a deeply-readonly version.
3
+ *
4
+ * Primitive types (`string`, `number`, `boolean`, `bigint`, `symbol`,
5
+ * `undefined`, `null`) are returned as-is. Arrays become `readonly` arrays
6
+ * of deeply-readonly elements. Object types have each property marked
7
+ * `readonly`, and the type of each property is recursively transformed.
8
+ *
9
+ * @public
10
+ */
11
+ export type DeepReadonly<T> = T extends string | number | boolean | bigint | symbol | undefined | null ? T : T extends readonly (infer Item)[] ? readonly DeepReadonly<Item>[] : T extends object ? {
12
+ readonly [K in keyof T]: DeepReadonly<T[K]>;
13
+ } : T;
14
+ /**
15
+ * Deep-freezes `value` and returns it typed as {@link DeepReadonly}`<T>`.
16
+ *
17
+ * Use this helper for module-scoped constant objects and arrays to satisfy
18
+ * the `dsl/no-module-scoped-mutable-const` lint rule. Unlike `Object.freeze`,
19
+ * which is shallow, `toConst` recursively freezes all nested objects and arrays.
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * import { toConst } from '@stripe/extensibility-sdk/stdlib';
24
+ *
25
+ * const DEFAULTS = toConst({ timeout: 30, retries: 3 });
26
+ * // Type: { readonly timeout: 30; readonly retries: 3 }
27
+ *
28
+ * const STATUSES = toConst(['active', 'pending', 'cancelled']);
29
+ * // Type: readonly ["active", "pending", "cancelled"]
30
+ * ```
31
+ *
32
+ * @public
33
+ */
34
+ export declare function toConst<T>(value: T): DeepReadonly<T>;
35
+ //# sourceMappingURL=to-const.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-const.d.ts","sourceRoot":"","sources":["../../src/stdlib/to-const.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAC3B,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,SAAS,GACT,IAAI,GACJ,CAAC,GACD,CAAC,SAAS,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,GAC/B,SAAS,YAAY,CAAC,IAAI,CAAC,EAAE,GAC7B,CAAC,SAAS,MAAM,GACd;IAAE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAC/C,CAAC,CAAC;AAEV;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAoBpD"}
@@ -3,5 +3,7 @@
3
3
  *
4
4
  * @public
5
5
  */
6
- export type ExtractObjectTag<T> = T extends { readonly object: infer O } ? O extends string ? O : never : never;
6
+ export type ExtractObjectTag<T> = T extends {
7
+ readonly object: infer O;
8
+ } ? O extends string ? O : never : never;
7
9
  //# sourceMappingURL=type-utils.d.ts.map
@@ -52,12 +52,12 @@ export interface _EnumSpec {
52
52
  * Convert a wire value to an SDK value, or `null` if unknown.
53
53
  * @internal
54
54
  */
55
- fromWire(value: string): null | string;
55
+ fromWire(value: string): string | null;
56
56
  /**
57
57
  * Convert an SDK value to a wire value, or `null` if unknown.
58
58
  * @internal
59
59
  */
60
- toWire(value: string): null | string;
60
+ toWire(value: string): string | null;
61
61
  }
62
62
  /**
63
63
  * Bidirectional enum spec for proto-backed enums. Accepts a single
@@ -74,12 +74,12 @@ export declare class _ProtoEnum implements _EnumSpec {
74
74
  * Convert a proto wire value to an SDK value, or `null` if unknown.
75
75
  * @internal
76
76
  */
77
- fromWire(value: string): null | string;
77
+ fromWire(value: string): string | null;
78
78
  /**
79
79
  * Convert an SDK value to a proto wire value, or `null` if unknown.
80
80
  * @internal
81
81
  */
82
- toWire(value: string): null | string;
82
+ toWire(value: string): string | null;
83
83
  }
84
84
  /**
85
85
  * Validation-only enum spec for config values. Accepts a set of known
@@ -95,12 +95,12 @@ export declare class _ConfigEnum implements _EnumSpec {
95
95
  * Validate and return the wire value unchanged, or `null` if unknown.
96
96
  * @internal
97
97
  */
98
- fromWire(value: string): null | string;
98
+ fromWire(value: string): string | null;
99
99
  /**
100
100
  * Validate and return the SDK value unchanged, or `null` if unknown.
101
101
  * @internal
102
102
  */
103
- toWire(value: string): null | string;
103
+ toWire(value: string): string | null;
104
104
  }
105
105
  /**
106
106
  * A field transformer with the strategy threaded through so transforms can