@nhost/stripe-graphql-js 0.0.3 → 0.0.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 (84) hide show
  1. package/README.md +22 -4
  2. package/dist/schema/address.js +24 -6
  3. package/dist/schema/address.js.map +1 -1
  4. package/dist/schema/billing-portal-session.js +17 -5
  5. package/dist/schema/billing-portal-session.js.map +1 -1
  6. package/dist/schema/customer-shipping.js +4 -0
  7. package/dist/schema/customer-shipping.js.map +1 -1
  8. package/dist/schema/customer-tax-location.js +4 -1
  9. package/dist/schema/customer-tax-location.js.map +1 -1
  10. package/dist/schema/customer-tax.js +2 -0
  11. package/dist/schema/customer-tax.js.map +1 -1
  12. package/dist/schema/customer.js +28 -5
  13. package/dist/schema/customer.js.map +1 -1
  14. package/dist/schema/customers.js +6 -2
  15. package/dist/schema/customers.js.map +1 -1
  16. package/dist/schema/invoice-automatic-tax.js +4 -1
  17. package/dist/schema/invoice-automatic-tax.js.map +1 -1
  18. package/dist/schema/invoice-custom-field.js +6 -2
  19. package/dist/schema/invoice-custom-field.js.map +1 -1
  20. package/dist/schema/invoice-customer-shipping.js +4 -0
  21. package/dist/schema/invoice-customer-shipping.js.map +1 -1
  22. package/dist/schema/invoice-customer-tax-id.js +4 -1
  23. package/dist/schema/invoice-customer-tax-id.js.map +1 -1
  24. package/dist/schema/invoice-line-item-period.js +6 -2
  25. package/dist/schema/invoice-line-item-period.js.map +1 -1
  26. package/dist/schema/invoice-line-item-tax-amount.js +6 -2
  27. package/dist/schema/invoice-line-item-tax-amount.js.map +1 -1
  28. package/dist/schema/invoice-line-item.js +33 -8
  29. package/dist/schema/invoice-line-item.js.map +1 -1
  30. package/dist/schema/invoice-line-items.js +6 -2
  31. package/dist/schema/invoice-line-items.js.map +1 -1
  32. package/dist/schema/invoice.js +92 -20
  33. package/dist/schema/invoice.js.map +1 -1
  34. package/dist/schema/invoices.js +6 -2
  35. package/dist/schema/invoices.js.map +1 -1
  36. package/dist/schema/payment-method-billing-details.js +4 -0
  37. package/dist/schema/payment-method-billing-details.js.map +1 -1
  38. package/dist/schema/payment-method-card-checks.js +3 -0
  39. package/dist/schema/payment-method-card-checks.js.map +1 -1
  40. package/dist/schema/payment-method-card-networks.js +4 -1
  41. package/dist/schema/payment-method-card-networks.js.map +1 -1
  42. package/dist/schema/payment-method-card-three-d-secure-usage.js +3 -1
  43. package/dist/schema/payment-method-card-three-d-secure-usage.js.map +1 -1
  44. package/dist/schema/payment-method-card-wallet-masterpass.js +4 -0
  45. package/dist/schema/payment-method-card-wallet-masterpass.js.map +1 -1
  46. package/dist/schema/payment-method-card-wallet-visa-checkout.js +4 -0
  47. package/dist/schema/payment-method-card-wallet-visa-checkout.js.map +1 -1
  48. package/dist/schema/payment-method-card-wallet.d.ts.map +1 -1
  49. package/dist/schema/payment-method-card-wallet.js +5 -1
  50. package/dist/schema/payment-method-card-wallet.js.map +1 -1
  51. package/dist/schema/payment-method-card.js +19 -4
  52. package/dist/schema/payment-method-card.js.map +1 -1
  53. package/dist/schema/payment-method.js +17 -5
  54. package/dist/schema/payment-method.js.map +1 -1
  55. package/dist/schema/payment-methods.d.ts.map +1 -1
  56. package/dist/schema/payment-methods.js +6 -2
  57. package/dist/schema/payment-methods.js.map +1 -1
  58. package/dist/schema/plan.js +39 -10
  59. package/dist/schema/plan.js.map +1 -1
  60. package/dist/schema/price.js +31 -8
  61. package/dist/schema/price.js.map +1 -1
  62. package/dist/schema/product.js +36 -8
  63. package/dist/schema/product.js.map +1 -1
  64. package/dist/schema/stripe.js +8 -3
  65. package/dist/schema/stripe.js.map +1 -1
  66. package/dist/schema/subscription-automatic-tax.js +3 -1
  67. package/dist/schema/subscription-automatic-tax.js.map +1 -1
  68. package/dist/schema/subscription-billing-thresholds.js +2 -0
  69. package/dist/schema/subscription-billing-thresholds.js.map +1 -1
  70. package/dist/schema/subscription-item-billing-thresholds.js +1 -0
  71. package/dist/schema/subscription-item-billing-thresholds.js.map +1 -1
  72. package/dist/schema/subscription-item.js +17 -4
  73. package/dist/schema/subscription-item.js.map +1 -1
  74. package/dist/schema/subscription-items.js +6 -2
  75. package/dist/schema/subscription-items.js.map +1 -1
  76. package/dist/schema/subscription.js +56 -13
  77. package/dist/schema/subscription.js.map +1 -1
  78. package/dist/schema/subscriptions.js +6 -2
  79. package/dist/schema/subscriptions.js.map +1 -1
  80. package/dist/schema/test-clock.js +22 -7
  81. package/dist/schema/test-clock.js.map +1 -1
  82. package/dist/types.d.ts +2 -2
  83. package/dist/types.d.ts.map +1 -1
  84. package/package.json +2 -3
@@ -1 +1 @@
1
- {"version":3,"file":"payment-methods.d.ts","sourceRoot":"","sources":["../../src/schema/payment-methods.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,wBAAwB,0vBA+BnC,CAAA"}
1
+ {"version":3,"file":"payment-methods.d.ts","sourceRoot":"","sources":["../../src/schema/payment-methods.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,wBAAwB,0vBA+BnC,CAAA"}
@@ -5,8 +5,12 @@ const builder_1 = require("../builder");
5
5
  builder_1.builder.objectType('StripePaymentMethods', {
6
6
  fields: (t) => ({
7
7
  object: t.exposeString('object'),
8
- url: t.exposeString('url'),
9
- hasMore: t.exposeBoolean('has_more'),
8
+ url: t.exposeString('url', {
9
+ description: `The URL where this list can be accessed.`
10
+ }),
11
+ hasMore: t.exposeBoolean('has_more', {
12
+ description: `True if this list has another page of items after this one that can be fetched.`
13
+ }),
10
14
  data: t.expose('data', {
11
15
  type: ['StripePaymentMethod'],
12
16
  nullable: false
@@ -1 +1 @@
1
- {"version":3,"file":"payment-methods.js","sourceRoot":"","sources":["../../src/schema/payment-methods.ts"],"names":[],"mappings":";;;AAAA,wCAAoC;AAEpC,iBAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE;IACzC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC;QAChC,GAAG,EAAE,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC;QAC1B,OAAO,EAAE,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC;QACpC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE;YACrB,IAAI,EAAE,CAAC,qBAAqB,CAAC;YAC7B,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH,CAAC;CACH,CAAC,CAAA;AAEF,yCAAyC;AACzC,2DAA2D;AAC3D,4CAA4C;AAC5C,gCAAgC;AAChC,sBAAsB;AACtB,2BAA2B;AAC3B,QAAQ;AACR,8BAA8B;AAC9B,sBAAsB;AACtB,QAAQ;AACR,6BAA6B;AAC7B,sBAAsB;AACtB,QAAQ;AACR,mBAAmB;AACnB,sBAAsB;AACtB,OAAO;AACP,MAAM;AAEN,kCAAkC;AACrB,QAAA,wBAAwB,GAAG,iBAAO,CAAC,QAAQ,CAAC,0BAA0B,EAAE;IACnF,MAAM,EAAE;QACN,YAAY;QACZ,QAAQ;QACR,mBAAmB;QACnB,QAAQ;QACR,eAAe;QACf,YAAY;QACZ,YAAY;QACZ,MAAM;QACN,QAAQ;QACR,MAAM;QACN,cAAc;QACd,kBAAkB;QAClB,KAAK;QACL,KAAK;QACL,SAAS;QACT,SAAS;QACT,OAAO;QACP,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;QACN,KAAK;QACL,QAAQ;QACR,WAAW;QACX,YAAY;QACZ,QAAQ;QACR,iBAAiB;QACjB,YAAY;KACJ;CACX,CAAC,CAAA"}
1
+ {"version":3,"file":"payment-methods.js","sourceRoot":"","sources":["../../src/schema/payment-methods.ts"],"names":[],"mappings":";;;AAAA,wCAAoC;AAEpC,iBAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE;IACzC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC;QAChC,GAAG,EAAE,CAAC,CAAC,YAAY,CAAC,KAAK,EAAE;YACzB,WAAW,EAAE,0CAA0C;SACxD,CAAC;QACF,OAAO,EAAE,CAAC,CAAC,aAAa,CAAC,UAAU,EAAE;YACnC,WAAW,EAAE,iFAAiF;SAC/F,CAAC;QACF,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE;YACrB,IAAI,EAAE,CAAC,qBAAqB,CAAC;YAC7B,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH,CAAC;CACH,CAAC,CAAA;AAEF,yCAAyC;AACzC,2DAA2D;AAC3D,4CAA4C;AAC5C,gCAAgC;AAChC,sBAAsB;AACtB,2BAA2B;AAC3B,QAAQ;AACR,8BAA8B;AAC9B,sBAAsB;AACtB,QAAQ;AACR,6BAA6B;AAC7B,sBAAsB;AACtB,QAAQ;AACR,mBAAmB;AACnB,sBAAsB;AACtB,OAAO;AACP,MAAM;AAEN,kCAAkC;AACrB,QAAA,wBAAwB,GAAG,iBAAO,CAAC,QAAQ,CAAC,0BAA0B,EAAE;IACnF,MAAM,EAAE;QACN,YAAY;QACZ,QAAQ;QACR,mBAAmB;QACnB,QAAQ;QACR,eAAe;QACf,YAAY;QACZ,YAAY;QACZ,MAAM;QACN,QAAQ;QACR,MAAM;QACN,cAAc;QACd,kBAAkB;QAClB,KAAK;QACL,KAAK;QACL,SAAS;QACT,SAAS;QACT,OAAO;QACP,QAAQ;QACR,SAAS;QACT,MAAM;QACN,MAAM;QACN,KAAK;QACL,QAAQ;QACR,WAAW;QACX,YAAY;QACZ,QAAQ;QACR,iBAAiB;QACjB,YAAY;KACJ;CACX,CAAC,CAAA"}
@@ -14,32 +14,56 @@ const utils_1 = require("../utils");
14
14
  builder_1.builder.objectType('StripePlan', {
15
15
  description: '',
16
16
  fields: (t) => ({
17
- id: t.exposeString('id'),
18
- object: t.exposeString('object'),
19
- active: t.exposeBoolean('active'),
17
+ id: t.exposeString('id', {
18
+ description: `Unique identifier for the object.`
19
+ }),
20
+ object: t.exposeString('object', {
21
+ description: `String representing the object's type. Objects of the same type share the same value.`
22
+ }),
23
+ active: t.exposeBoolean('active', {
24
+ description: `Whether the plan can be used for new purchases.`
25
+ }),
20
26
  aggregateUsage: t.exposeString('aggregate_usage', {
27
+ description: `Specifies a usage aggregation strategy for plans of \`usage_type=metered\`. Allowed values are \`sum\` for summing up all usage during a period, \`last_during_period\` for using the last usage record reported within a period, \`last_ever\` for using the last usage record ever (across period bounds) or \`max\` which uses the usage record with the maximum reported usage during a period. Defaults to \`sum\`.`,
21
28
  nullable: true
22
29
  }),
23
30
  amount: t.exposeInt('amount', {
31
+ description: `The unit amount in %s to be charged, represented as a whole integer if possible. Only set if \`billing_scheme=per_unit\`.`,
24
32
  nullable: true
25
33
  }),
26
34
  amountDecimal: t.exposeString('amount_decimal', {
35
+ description: `The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if \`billing_scheme=per_unit\`.`,
27
36
  nullable: true
28
37
  }),
29
- billingScheme: t.exposeString('billing_scheme'),
30
- created: t.exposeInt('created'),
31
- currency: t.exposeString('currency'),
32
- interval: t.exposeString('interval'),
33
- intervalCount: t.exposeInt('interval_count'),
34
- livemode: t.exposeBoolean('livemode'),
38
+ billingScheme: t.exposeString('billing_scheme', {
39
+ description: `Describes how to compute the price per period. Either \`per_unit\` or \`tiered\`. \`per_unit\` indicates that the fixed amount (specified in \`amount\`) will be charged per unit in \`quantity\` (for plans with \`usage_type=licensed\`), or per unit of total usage (for plans with \`usage_type=metered\`). \`tiered\` indicates that the unit pricing will be computed using a tiering strategy as defined using the \`tiers\` and \`tiers_mode\` attributes.`
40
+ }),
41
+ created: t.exposeInt('created', {
42
+ description: `Time at which the object was created. Measured in seconds since the Unix epoch.`
43
+ }),
44
+ currency: t.exposeString('currency', {
45
+ description: `Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).`
46
+ }),
47
+ interval: t.exposeString('interval', {
48
+ description: `The frequency at which a subscription is billed. One of \`day\`, \`week\`, \`month\` or \`year\`.`
49
+ }),
50
+ intervalCount: t.exposeInt('interval_count', {
51
+ description: `The number of intervals (specified in the \`interval\` attribute) between subscription billings. For example, \`interval=month\` and \`interval_count=3\` bills every 3 months.`
52
+ }),
53
+ livemode: t.exposeBoolean('livemode', {
54
+ description: `Has the value \`true\` if the object exists in live mode or the value \`false\` if the object exists in test mode.`
55
+ }),
35
56
  metadata: t.expose('metadata', {
57
+ description: `Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.`,
36
58
  type: 'JSON',
37
59
  nullable: true
38
60
  }),
39
61
  nickname: t.exposeString('nickname', {
62
+ description: `A brief description of the plan, hidden from customers.`,
40
63
  nullable: true
41
64
  }),
42
65
  product: t.field({
66
+ description: `The product whose pricing this plan determines.`,
43
67
  type: 'StripeProduct',
44
68
  nullable: true,
45
69
  resolve: (price) => __awaiter(void 0, void 0, void 0, function* () {
@@ -54,16 +78,21 @@ builder_1.builder.objectType('StripePlan', {
54
78
  // toddo: tiers
55
79
  // todo: tiers
56
80
  tiersMode: t.exposeString('tiers_mode', {
81
+ description: `Defines if the tiering price should be \`graduated\` or \`volume\` based. In \`volume\`-based tiering, the maximum quantity within a period determines the per unit price. In \`graduated\` tiering, pricing can change as the quantity grows.`,
57
82
  nullable: true
58
83
  }),
59
84
  transformUsage: t.expose('transform_usage', {
85
+ description: `Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with \`tiers\`.`,
60
86
  type: 'StripePlanTransformUsage',
61
87
  nullable: true
62
88
  }),
63
89
  trialPeriodDays: t.exposeInt('trial_period_days', {
90
+ description: `Default number of trial days when subscribing a customer to this plan using [\`trial_from_plan=true\`](https://stripe.com/docs/api#create_subscription-trial_from_plan).`,
64
91
  nullable: true
65
92
  }),
66
- usageType: t.exposeString('usage_type')
93
+ usageType: t.exposeString('usage_type', {
94
+ description: `Configures how the quantity per period should be determined. Can be either \`metered\` or \`licensed\`. \`licensed\` automatically bills the \`quantity\` set when adding it to a subscription. \`metered\` aggregates the total usage based on usage records. Defaults to \`licensed\`.`
95
+ })
67
96
  })
68
97
  });
69
98
  //# sourceMappingURL=plan.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan.js","sourceRoot":"","sources":["../../src/schema/plan.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,wCAAoC;AACpC,oCAAiC;AAEjC,iBAAO,CAAC,UAAU,CAAC,YAAY,EAAE;IAC/B,WAAW,EAAE,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC;QACxB,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC;QAChC,MAAM,EAAE,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC;QACjC,cAAc,EAAE,CAAC,CAAC,YAAY,CAAC,iBAAiB,EAAE;YAChD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC5B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,aAAa,EAAE,CAAC,CAAC,YAAY,CAAC,gBAAgB,EAAE;YAC9C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,aAAa,EAAE,CAAC,CAAC,YAAY,CAAC,gBAAgB,CAAC;QAC/C,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC;QAC/B,QAAQ,EAAE,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC;QACpC,QAAQ,EAAE,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC;QACpC,aAAa,EAAE,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC;QAC5C,QAAQ,EAAE,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC;QACrC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE;YAC7B,IAAI,EA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M;YACZ,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,CAAC,CAAC,YAAY,CAAC,UAAU,EAAE;YACnC,WAAW,EAAE,yDAAyD;YACtE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC;YACf,WAAW,EAAE,iDAAiD;YAC9D,IAAI,EAAE,eAAe;YACrB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAO,KAAK,EAAE,EAAE;gBACvB,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAA;gBAEzB,IAAI,CAAC,OAAO,EAAE;oBACZ,OAAO,IAAI,CAAA;iBACZ;gBAED,MAAM,WAAW,GAAG,MAAM,cAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAiB,CAAC,CAAA;gBACrE,OAAO,WAA6B,CAAA;YACtC,CAAC,CAAA;SACF,CAAC;QACF,eAAe;QACf,cAAc;QACd,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,YAAY,EAAE;YACtC,WAAW,EAAE,gPAAgP;YAC7P,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,cAAc,EAAE,CAAC,CAAC,MAAM,CAAC,iBAAiB,EAAE;YAC1C,WAAW,EAAE,qIAAqI;YAClJ,IAAI,EAAE,0BAA0B;YAChC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,eAAe,EAAE,CAAC,CAAC,SAAS,CAAC,mBAAmB,EAAE;YAChD,WAAW,EAAE,0KAA0K;YACvL,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,YAAY,EAAE;YACtC,WAAW,EAAE,0RAA0R;SACxS,CAAC;KACH,CAAC;CACH,CAAC,CAAA"}
@@ -14,27 +14,45 @@ const utils_1 = require("../utils");
14
14
  builder_1.builder.objectType('StripePrice', {
15
15
  description: '',
16
16
  fields: (t) => ({
17
- id: t.exposeString('id'),
18
- object: t.exposeString('object'),
19
- active: t.exposeBoolean('active'),
17
+ id: t.exposeString('id', {
18
+ description: 'Unique identifier for the object.'
19
+ }),
20
+ object: t.exposeString('object', {
21
+ description: `String representing the object's type. Objects of the same type share the same value.`
22
+ }),
23
+ active: t.exposeBoolean('active', {
24
+ description: `Whether the price can be used for new purchases.`
25
+ }),
20
26
  // todo: billing_scheme
21
- billingScheme: t.exposeString('billing_scheme'),
22
- created: t.exposeInt('created'),
23
- currency: t.exposeString('currency'),
27
+ billingScheme: t.exposeString('billing_scheme', {
28
+ description: `Describes how to compute the price per period. Either \`per_unit\` or \`tiered\`. \`per_unit\` indicates that the fixed amount (specified in \`unit_amount\` or \`unit_amount_decimal\`) will be charged per unit in \`quantity\` (for prices with \`usage_type=licensed\`), or per unit of total usage (for prices with \`usage_type=metered\`). \`tiered\` indicates that the unit pricing will be computed using a tiering strategy as defined using the \`tiers\` and \`tiers_mode\` attributes.`
29
+ }),
30
+ created: t.exposeInt('created', {
31
+ description: `Time at which the object was created. Measured in seconds since the Unix epoch.`
32
+ }),
33
+ currency: t.exposeString('currency', {
34
+ description: `Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).`
35
+ }),
24
36
  // todo: currency_options
25
37
  // todo: custom_unit_amount
26
- livemode: t.exposeBoolean('livemode'),
38
+ livemode: t.exposeBoolean('livemode', {
39
+ description: `Has the value \`true\` if the object exists in live mode or the value \`false\` if the object exists in test mode.`
40
+ }),
27
41
  lookupKey: t.exposeString('lookup_key', {
42
+ description: `A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.`,
28
43
  nullable: true
29
44
  }),
30
45
  metadata: t.expose('metadata', {
46
+ description: `Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.`,
31
47
  type: 'JSON',
32
48
  nullable: true
33
49
  }),
34
50
  nickname: t.exposeString('nickname', {
51
+ description: `A brief description of the price, hidden from customers.`,
35
52
  nullable: true
36
53
  }),
37
54
  product: t.field({
55
+ description: `The ID of the product this price is associated with.`,
38
56
  type: 'StripeProduct',
39
57
  resolve: (price) => __awaiter(void 0, void 0, void 0, function* () {
40
58
  const { product } = price;
@@ -46,16 +64,21 @@ builder_1.builder.objectType('StripePrice', {
46
64
  // todo: tax_behavior
47
65
  // todo: tiers
48
66
  tiersMode: t.exposeString('tiers_mode', {
67
+ description: `Defines if the tiering price should be \`graduated\` or \`volume\` based. In \`volume\`-based tiering, the maximum quantity within a period determines the per unit price. In \`graduated\` tiering, pricing can change as the quantity grows.`,
49
68
  nullable: true
50
69
  }),
51
70
  // tiersQuantity: t.exposeString('transform_quantity', {
52
71
  // nullable: true
53
72
  // })
54
- type: t.exposeString('type'),
73
+ type: t.exposeString('type', {
74
+ description: `One of \`one_time\` or \`recurring\` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.`
75
+ }),
55
76
  unitAmount: t.exposeInt('unit_amount', {
77
+ description: `The unit amount in %s to be charged, represented as a whole integer if possible. Only set if \`billing_scheme=per_unit\`.`,
56
78
  nullable: true
57
79
  }),
58
80
  unitAmountDecimal: t.exposeString('unit_amount_decimal', {
81
+ description: `The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if \`billing_scheme=per_unit\`.`,
59
82
  nullable: true
60
83
  })
61
84
  })
@@ -1 +1 @@
1
- {"version":3,"file":"price.js","sourceRoot":"","sources":["../../src/schema/price.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,wCAAoC;AACpC,oCAAiC;AAEjC,iBAAO,CAAC,UAAU,CAAC,aAAa,EAAE;IAChC,WAAW,EAAE,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC;QACxB,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC;QAChC,MAAM,EAAE,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC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E,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,CAAC,CAAC,YAAY,CAAC,UAAU,EAAE;YACnC,WAAW,EAAE,0DAA0D;YACvE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC;YACf,WAAW,EAAE,sDAAsD;YACnE,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE,CAAO,KAAK,EAAE,EAAE;gBACvB,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAA;gBACzB,MAAM,WAAW,GAAG,MAAM,cAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAiB,CAAC,CAAA;gBACrE,OAAO,WAA6B,CAAA;YACtC,CAAC,CAAA;SACF,CAAC;QACF,kBAAkB;QAClB,qBAAqB;QACrB,cAAc;QACd,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,YAAY,EAAE;YACtC,WAAW,EAAE,gPAAgP;YAC7P,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,wDAAwD;QACxD,mBAAmB;QACnB,KAAK;QACL,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE;YAC3B,WAAW,EAAE,wIAAwI;SACtJ,CAAC;QACF,UAAU,EAAE,CAAC,CAAC,SAAS,CAAC,aAAa,EAAE;YACrC,WAAW,EAAE,2HAA2H;YACxI,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,iBAAiB,EAAE,CAAC,CAAC,YAAY,CAAC,qBAAqB,EAAE;YACvD,WAAW,EAAE,+IAA+I;YAC5J,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;CACH,CAAC,CAAA"}
@@ -14,20 +14,32 @@ const utils_1 = require("../utils");
14
14
  builder_1.builder.objectType('StripeProduct', {
15
15
  description: '',
16
16
  fields: (t) => ({
17
- id: t.exposeString('id'),
18
- object: t.exposeString('object'),
19
- active: t.exposeBoolean('active'),
17
+ id: t.exposeString('id', {
18
+ description: `Unique identifier for the object.`
19
+ }),
20
+ object: t.exposeString('object', {
21
+ description: `String representing the object's type. Objects of the same type share the same value.`
22
+ }),
23
+ active: t.exposeBoolean('active', {
24
+ description: `Whether the product is currently available for purchase.`
25
+ }),
20
26
  attributes: t.exposeStringList('attributes', {
27
+ description: `A list of up to 5 attributes that each SKU can provide values for (e.g., \`["color", "size"]\`).`,
21
28
  nullable: true
22
29
  }),
23
30
  caption: t.exposeString('caption', {
31
+ description: `A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of \`type=good\`.`,
24
32
  nullable: true
25
33
  }),
26
- created: t.exposeInt('created'),
34
+ created: t.exposeInt('created', {
35
+ description: `Time at which the object was created. Measured in seconds since the Unix epoch.`
36
+ }),
27
37
  deactivateOn: t.exposeStringList('deactivate_on', {
38
+ description: `An array of connect application identifiers that cannot purchase this product. Only applicable to products of \`type=good\`.`,
28
39
  nullable: true
29
40
  }),
30
41
  defaultPrice: t.field({
42
+ description: `The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.`,
31
43
  type: 'StripePrice',
32
44
  nullable: true,
33
45
  resolve: (product) => __awaiter(void 0, void 0, void 0, function* () {
@@ -43,31 +55,47 @@ builder_1.builder.objectType('StripeProduct', {
43
55
  })
44
56
  }),
45
57
  description: t.exposeString('description', {
58
+ description: `The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.`,
46
59
  nullable: true
47
60
  }),
48
61
  images: t.exposeStringList('images', {
62
+ description: `A list of up to 8 URLs of images for this product, meant to be displayable to the customer.`,
49
63
  nullable: true
50
64
  }),
51
- livemode: t.exposeBoolean('livemode'),
65
+ livemode: t.exposeBoolean('livemode', {
66
+ description: `Has the value \`true\` if the object exists in live mode or the value \`false\` if the object exists in test mode.`
67
+ }),
52
68
  metadata: t.expose('metadata', {
69
+ description: `Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.`,
53
70
  type: 'JSON',
54
71
  nullable: true
55
72
  }),
56
- name: t.exposeString('name'),
73
+ name: t.exposeString('name', {
74
+ description: `The product's name, meant to be displayable to the customer.`
75
+ }),
57
76
  // todo: pacakge dimentions
77
+ // todo: fix typo here -> shippable
58
78
  sippable: t.exposeBoolean('shippable', {
79
+ description: `Whether this product is shipped (i.e., physical goods).`,
59
80
  nullable: true
60
81
  }),
61
82
  statementDescriptor: t.exposeString('statement_descriptor', {
83
+ description: `Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used.`,
62
84
  nullable: true
63
85
  }),
64
86
  // todo: tax code
65
- type: t.exposeString('type'),
87
+ type: t.exposeString('type', {
88
+ description: `The type of the product. The product is either of type \`good\`, which is eligible for use with Orders and SKUs, or \`service\`, which is eligible for use with Subscriptions and Plans.`
89
+ }),
66
90
  unitLabel: t.exposeString('unit_label', {
91
+ description: `A label that represents units of this product in Stripe and on customers' receipts and invoices. When set, this will be included in associated invoice line item descriptions.`,
67
92
  nullable: true
68
93
  }),
69
- updated: t.exposeInt('updated'),
94
+ updated: t.exposeInt('updated', {
95
+ description: `Time at which the object was last updated. Measured in seconds since the Unix epoch.`
96
+ }),
70
97
  url: t.exposeString('url', {
98
+ description: `A URL of a publicly-accessible webpage for this product.`,
71
99
  nullable: true
72
100
  })
73
101
  })
@@ -1 +1 @@
1
- {"version":3,"file":"product.js","sourceRoot":"","sources":["../../src/schema/product.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,wCAAoC;AACpC,oCAAiC;AAEjC,iBAAO,CAAC,UAAU,CAAC,eAAe,EAAE;IAClC,WAAW,EAAE,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC;QACxB,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC;QAChC,MAAM,EAAE,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC;QACjC,UAAU,EAAE,CAAC,CAAC,gBAAg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B;QAC3B,mCAAmC;QACnC,QAAQ,EAAE,CAAC,CAAC,aAAa,CAAC,WAAW,EAAE;YACrC,WAAW,EAAE,yDAAyD;YACtE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,mBAAmB,EAAE,CAAC,CAAC,YAAY,CAAC,sBAAsB,EAAE;YAC1D,WAAW,EAAE,mMAAmM;YAChN,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,iBAAiB;QACjB,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE;YAC3B,WAAW,EAAE,0LAA0L;SACxM,CAAC;QACF,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,YAAY,EAAE;YACtC,WAAW,EAAE,gLAAgL;YAC7L,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,EAAE;YAC9B,WAAW,EAAE,sFAAsF;SACpG,CAAC;QACF,GAAG,EAAE,CAAC,CAAC,YAAY,CAAC,KAAK,EAAE;YACzB,WAAW,EAAE,0DAA0D;YACvE,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;CACH,CAAC,CAAA"}
@@ -23,7 +23,7 @@ builder_1.builder.objectType('Stripe', {
23
23
  },
24
24
  resolve: (_parent, { id }, context) => __awaiter(void 0, void 0, void 0, function* () {
25
25
  const { isAllowed } = context;
26
- if (!isAllowed(id, context)) {
26
+ if (!(yield isAllowed(id, context))) {
27
27
  throw new node_1.GraphQLYogaError('Not allowed');
28
28
  }
29
29
  const customer = yield utils_1.stripe.customers.retrieve(id);
@@ -61,7 +61,12 @@ builder_1.builder.objectType('Stripe', {
61
61
  ending_before: endingBefore || undefined,
62
62
  starting_after: startingAfter || undefined
63
63
  });
64
- const customerData = customers.data.filter((customer) => isAllowed(customer.id, context));
64
+ const customerData = [];
65
+ for (const customer of customers.data) {
66
+ if (yield isAllowed(customer.id, context)) {
67
+ customerData.push(customer);
68
+ }
69
+ }
65
70
  customers.data = customerData;
66
71
  return customers;
67
72
  })
@@ -88,7 +93,7 @@ builder_1.builder.objectType('StripeMutations', {
88
93
  },
89
94
  resolve: (_, { customer, configuration, locale, returnUrl }, context) => __awaiter(void 0, void 0, void 0, function* () {
90
95
  const { isAllowed } = context;
91
- if (!isAllowed(customer, context)) {
96
+ if (!(yield isAllowed(customer, context))) {
92
97
  throw new node_1.GraphQLYogaError('Not allowed');
93
98
  }
94
99
  const session = yield utils_1.stripe.billingPortal.sessions.create({
@@ -1 +1 @@
1
- {"version":3,"file":"stripe.js","sourceRoot":"","sources":["../../src/schema/stripe.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,6CAAqD;AAErD,wCAAoC;AACpC,oCAAiC;AAEjC,iBAAO,CAAC,UAAU,CAAC,QAAQ,EAAE;IAC3B,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC;YAChB,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE;gBACJ,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;oBACf,QAAQ,EAAE,IAAI;iBACf,CAAC;aACH;YACD,OAAO,EAAE,CAAO,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE;gBAC1C,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAA;gBAE7B,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE;oBAC3B,MAAM,IAAI,uBAAgB,CAAC,aAAa,CAAC,CAAA;iBAC1C;gBAED,MAAM,QAAQ,GAAG,MAAM,cAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;gBAEpD,IAAI,QAAQ,CAAC,OAAO,EAAE;oBACpB,MAAM,IAAI,uBAAgB,CAAC,gCAAgC,CAAC,CAAA;iBAC7D;gBAED,OAAO,QAAQ,CAAA;YACjB,CAAC,CAAA;SACF,CAAC;QACF,SAAS,EAAE,CAA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S;oBAChF,UAAU,EAAE,SAAS,IAAI,SAAS;iBACnC,CAAC,CAAA;gBAEF,OAAO,OAAO,CAAA;YAChB,CAAC,CAAA;SACF,CAAC;KACH,CAAC;CACH,CAAC,CAAA;AAEF,iBAAO,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC;QACd,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;KACpB,CAAC;CACH,CAAC,CAAC,CAAA;AAEH,iBAAO,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC;QACd,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;KACpB,CAAC;CACH,CAAC,CAAC,CAAA"}
@@ -4,7 +4,9 @@ const builder_1 = require("../builder");
4
4
  builder_1.builder.objectType('StripeSubscriptionAutomaticTax', {
5
5
  description: '',
6
6
  fields: (t) => ({
7
- enabled: t.exposeBoolean('enabled')
7
+ enabled: t.exposeBoolean('enabled', {
8
+ description: `Whether Stripe automatically computes tax on this subscription.`
9
+ })
8
10
  })
9
11
  });
10
12
  //# sourceMappingURL=subscription-automatic-tax.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscription-automatic-tax.js","sourceRoot":"","sources":["../../src/schema/subscription-automatic-tax.ts"],"names":[],"mappings":";;AAAA,wCAAoC;AAEpC,iBAAO,CAAC,UAAU,CAAC,gCAAgC,EAAE;IACnD,WAAW,EAAE,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,OAAO,EAAE,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC;KACpC,CAAC;CACH,CAAC,CAAA"}
1
+ {"version":3,"file":"subscription-automatic-tax.js","sourceRoot":"","sources":["../../src/schema/subscription-automatic-tax.ts"],"names":[],"mappings":";;AAAA,wCAAoC;AAEpC,iBAAO,CAAC,UAAU,CAAC,gCAAgC,EAAE;IACnD,WAAW,EAAE,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,OAAO,EAAE,CAAC,CAAC,aAAa,CAAC,SAAS,EAAE;YAClC,WAAW,EAAE,iEAAiE;SAC/E,CAAC;KACH,CAAC;CACH,CAAC,CAAA"}
@@ -5,9 +5,11 @@ builder_1.builder.objectType('StripeSubscriptionBillingThresholds', {
5
5
  description: '',
6
6
  fields: (t) => ({
7
7
  amountGte: t.exposeInt('amount_gte', {
8
+ description: `Monetary threshold that triggers the subscription to create an invoice`,
8
9
  nullable: true
9
10
  }),
10
11
  resetBillingCycleAnchor: t.exposeBoolean('reset_billing_cycle_anchor', {
12
+ description: `Indicates if the \`billing_cycle_anchor\` should be reset when a threshold is reached. If true, \`billing_cycle_anchor\` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be \`true\` if the subscription contains items with plans that have \`aggregate_usage=last_ever\`.`,
11
13
  nullable: true
12
14
  })
13
15
  })
@@ -1 +1 @@
1
- {"version":3,"file":"subscription-billing-thresholds.js","sourceRoot":"","sources":["../../src/schema/subscription-billing-thresholds.ts"],"names":[],"mappings":";;AAAA,wCAAoC;AAEpC,iBAAO,CAAC,UAAU,CAAC,qCAAqC,EAAE;IACxD,WAAW,EAAE,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,YAAY,EAAE;YACnC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,uBAAuB,EAAE,CAAC,CAAC,aAAa,CAAC,4BAA4B,EAAE;YACrE,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;CACH,CAAC,CAAA"}
1
+ {"version":3,"file":"subscription-billing-thresholds.js","sourceRoot":"","sources":["../../src/schema/subscription-billing-thresholds.ts"],"names":[],"mappings":";;AAAA,wCAAoC;AAEpC,iBAAO,CAAC,UAAU,CAAC,qCAAqC,EAAE;IACxD,WAAW,EAAE,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,YAAY,EAAE;YACnC,WAAW,EAAE,wEAAwE;YACrF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,uBAAuB,EAAE,CAAC,CAAC,aAAa,CAAC,4BAA4B,EAAE;YACrE,WAAW,EAAE,6VAA6V;YAC1W,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;CACH,CAAC,CAAA"}
@@ -5,6 +5,7 @@ builder_1.builder.objectType('StripeSubscriptionItemBillingThresholds', {
5
5
  description: '',
6
6
  fields: (t) => ({
7
7
  usageGte: t.exposeInt('usage_gte', {
8
+ description: `Usage threshold that triggers the subscription to create an invoice`,
8
9
  nullable: true
9
10
  })
10
11
  })
@@ -1 +1 @@
1
- {"version":3,"file":"subscription-item-billing-thresholds.js","sourceRoot":"","sources":["../../src/schema/subscription-item-billing-thresholds.ts"],"names":[],"mappings":";;AAAA,wCAAoC;AAEpC,iBAAO,CAAC,UAAU,CAAC,yCAAyC,EAAE;IAC5D,WAAW,EAAE,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,WAAW,EAAE;YACjC,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;CACH,CAAC,CAAA"}
1
+ {"version":3,"file":"subscription-item-billing-thresholds.js","sourceRoot":"","sources":["../../src/schema/subscription-item-billing-thresholds.ts"],"names":[],"mappings":";;AAAA,wCAAoC;AAEpC,iBAAO,CAAC,UAAU,CAAC,yCAAyC,EAAE;IAC5D,WAAW,EAAE,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,WAAW,EAAE;YACjC,WAAW,EAAE,qEAAqE;YAClF,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;CACH,CAAC,CAAA"}
@@ -4,26 +4,39 @@ const builder_1 = require("../builder");
4
4
  builder_1.builder.objectType('StripeSubscriptionItem', {
5
5
  description: '',
6
6
  fields: (t) => ({
7
- id: t.exposeString('id'),
8
- object: t.exposeString('object'),
7
+ id: t.exposeString('id', {
8
+ description: `Unique identifier for the object.`
9
+ }),
10
+ object: t.exposeString('object', {
11
+ description: `String representing the object's type. Objects of the same type share the same value.`
12
+ }),
9
13
  billingThresholds: t.expose('billing_thresholds', {
14
+ description: `Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period`,
10
15
  type: 'StripeSubscriptionItemBillingThresholds',
11
16
  nullable: true
12
17
  }),
13
- created: t.exposeInt('created'),
18
+ created: t.exposeInt('created', {
19
+ description: `Time at which the object was created. Measured in seconds since the Unix epoch.`
20
+ }),
14
21
  metadata: t.expose('metadata', {
22
+ description: `Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.`,
15
23
  type: 'JSON'
16
24
  }),
17
25
  plan: t.expose('plan', {
26
+ description: `You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.\n\nPlans define the base price, currency, and billing cycle for recurring purchases of products.\n\n[Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.\n\nFor example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).`,
18
27
  type: 'StripePlan'
19
28
  }),
20
29
  price: t.expose('price', {
30
+ description: `Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.\n\n[Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.\n\nFor example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.\n\nRelated guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).`,
21
31
  type: 'StripePrice'
22
32
  }),
23
33
  quantity: t.exposeInt('quantity', {
34
+ description: `The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed.`,
24
35
  nullable: true
25
36
  }),
26
- subscription: t.exposeString('subscription')
37
+ subscription: t.exposeString('subscription', {
38
+ description: `The \`subscription\` this \`subscription_item\` belongs to.`
39
+ })
27
40
  // todo:
28
41
  // taxRates: t.exposeStringList('tax_rates', {
29
42
  // nullable: true
@@ -1 +1 @@
1
- {"version":3,"file":"subscription-item.js","sourceRoot":"","sources":["../../src/schema/subscription-item.ts"],"names":[],"mappings":";;AAAA,wCAAoC;AAEpC,iBAAO,CAAC,UAAU,CAAC,wBAAwB,EAAE;IAC3C,WAAW,EAAE,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC;QACxB,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC;QAChC,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC,oBAAoB,EAAE;YAChD,IAAI,EAAE,yCAAyC;YAC/C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC;QAC/B,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE;YAC7B,IAAI,EAAE,MAAM;SACb,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,WAAW,EAAE,y7BAAy7B;YACt8B,IAAI,EAAE,YAAY;SACnB,CAAC;QACF,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE;YACvB,WAAW,EAAE,41BAA41B;YACz2B,IAAI,EAAE,aAAa;SACpB,CAAC;QACF,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,EAAE;YAChC,WAAW,EAAE,0HAA0H;YACvI,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,YAAY,EAAE,CAAC,CAAC,YAAY,CAAC,cAAc,EAAE;YAC3C,WAAW,EAAE,6DAA6D;SAC3E,CAAC;QACF,QAAQ;QACR,8CAA8C;QAC9C,mBAAmB;QACnB,KAAK;KACN,CAAC;CACH,CAAC,CAAA"}
@@ -4,8 +4,12 @@ const builder_1 = require("../builder");
4
4
  builder_1.builder.objectType('StripeSubscriptionItems', {
5
5
  fields: (t) => ({
6
6
  object: t.exposeString('object'),
7
- url: t.exposeString('url'),
8
- hasMore: t.exposeBoolean('has_more'),
7
+ url: t.exposeString('url', {
8
+ description: `The URL where this list can be accessed.`
9
+ }),
10
+ hasMore: t.exposeBoolean('has_more', {
11
+ description: `True if this list has another page of items after this one that can be fetched.`
12
+ }),
9
13
  data: t.expose('data', {
10
14
  type: ['StripeSubscriptionItem'],
11
15
  nullable: false
@@ -1 +1 @@
1
- {"version":3,"file":"subscription-items.js","sourceRoot":"","sources":["../../src/schema/subscription-items.ts"],"names":[],"mappings":";;AAAA,wCAAoC;AAEpC,iBAAO,CAAC,UAAU,CAAC,yBAAyB,EAAE;IAC5C,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC;QAChC,GAAG,EAAE,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC;QAC1B,OAAO,EAAE,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC;QACpC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE;YACrB,IAAI,EAAE,CAAC,wBAAwB,CAAC;YAChC,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH,CAAC;CACH,CAAC,CAAA"}
1
+ {"version":3,"file":"subscription-items.js","sourceRoot":"","sources":["../../src/schema/subscription-items.ts"],"names":[],"mappings":";;AAAA,wCAAoC;AAEpC,iBAAO,CAAC,UAAU,CAAC,yBAAyB,EAAE;IAC5C,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACd,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC;QAChC,GAAG,EAAE,CAAC,CAAC,YAAY,CAAC,KAAK,EAAE;YACzB,WAAW,EAAE,0CAA0C;SACxD,CAAC;QACF,OAAO,EAAE,CAAC,CAAC,aAAa,CAAC,UAAU,EAAE;YACnC,WAAW,EAAE,iFAAiF;SAC/F,CAAC;QACF,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE;YACrB,IAAI,EAAE,CAAC,wBAAwB,CAAC;YAChC,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH,CAAC;CACH,CAAC,CAAA"}