@nhost/stripe-graphql-js 0.0.4 → 0.0.6

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 (115) hide show
  1. package/README.md +8 -0
  2. package/dist/builder.d.ts +7 -1
  3. package/dist/builder.d.ts.map +1 -1
  4. package/dist/builder.js.map +1 -1
  5. package/dist/schema/address.js +24 -6
  6. package/dist/schema/address.js.map +1 -1
  7. package/dist/schema/billing-portal-session.js +17 -5
  8. package/dist/schema/billing-portal-session.js.map +1 -1
  9. package/dist/schema/charge.d.ts +2 -0
  10. package/dist/schema/charge.d.ts.map +1 -0
  11. package/dist/schema/charge.js +85 -0
  12. package/dist/schema/charge.js.map +1 -0
  13. package/dist/schema/charges.d.ts +2 -0
  14. package/dist/schema/charges.d.ts.map +1 -0
  15. package/dist/schema/charges.js +16 -0
  16. package/dist/schema/charges.js.map +1 -0
  17. package/dist/schema/connectedAccount.d.ts +2 -0
  18. package/dist/schema/connectedAccount.d.ts.map +1 -0
  19. package/dist/schema/connectedAccount.js +30 -0
  20. package/dist/schema/connectedAccount.js.map +1 -0
  21. package/dist/schema/connectedAccounts.d.ts +2 -0
  22. package/dist/schema/connectedAccounts.d.ts.map +1 -0
  23. package/dist/schema/connectedAccounts.js +16 -0
  24. package/dist/schema/connectedAccounts.js.map +1 -0
  25. package/dist/schema/customer-shipping.js +4 -0
  26. package/dist/schema/customer-shipping.js.map +1 -1
  27. package/dist/schema/customer-tax-location.js +4 -1
  28. package/dist/schema/customer-tax-location.js.map +1 -1
  29. package/dist/schema/customer-tax.js +2 -0
  30. package/dist/schema/customer-tax.js.map +1 -1
  31. package/dist/schema/customer.js +48 -5
  32. package/dist/schema/customer.js.map +1 -1
  33. package/dist/schema/customers.js +6 -2
  34. package/dist/schema/customers.js.map +1 -1
  35. package/dist/schema/index.d.ts +6 -0
  36. package/dist/schema/index.d.ts.map +1 -1
  37. package/dist/schema/index.js +6 -0
  38. package/dist/schema/index.js.map +1 -1
  39. package/dist/schema/invoice-automatic-tax.js +4 -1
  40. package/dist/schema/invoice-automatic-tax.js.map +1 -1
  41. package/dist/schema/invoice-custom-field.js +6 -2
  42. package/dist/schema/invoice-custom-field.js.map +1 -1
  43. package/dist/schema/invoice-customer-shipping.js +4 -0
  44. package/dist/schema/invoice-customer-shipping.js.map +1 -1
  45. package/dist/schema/invoice-customer-tax-id.js +4 -1
  46. package/dist/schema/invoice-customer-tax-id.js.map +1 -1
  47. package/dist/schema/invoice-line-item-period.js +6 -2
  48. package/dist/schema/invoice-line-item-period.js.map +1 -1
  49. package/dist/schema/invoice-line-item-tax-amount.js +6 -2
  50. package/dist/schema/invoice-line-item-tax-amount.js.map +1 -1
  51. package/dist/schema/invoice-line-item.js +33 -8
  52. package/dist/schema/invoice-line-item.js.map +1 -1
  53. package/dist/schema/invoice-line-items.js +6 -2
  54. package/dist/schema/invoice-line-items.js.map +1 -1
  55. package/dist/schema/invoice.js +103 -21
  56. package/dist/schema/invoice.js.map +1 -1
  57. package/dist/schema/invoices.js +6 -2
  58. package/dist/schema/invoices.js.map +1 -1
  59. package/dist/schema/payment-intent.d.ts +2 -0
  60. package/dist/schema/payment-intent.d.ts.map +1 -0
  61. package/dist/schema/payment-intent.js +79 -0
  62. package/dist/schema/payment-intent.js.map +1 -0
  63. package/dist/schema/payment-intents.d.ts +2 -0
  64. package/dist/schema/payment-intents.d.ts.map +1 -0
  65. package/dist/schema/payment-intents.js +15 -0
  66. package/dist/schema/payment-intents.js.map +1 -0
  67. package/dist/schema/payment-method-billing-details.js +4 -0
  68. package/dist/schema/payment-method-billing-details.js.map +1 -1
  69. package/dist/schema/payment-method-card-checks.js +3 -0
  70. package/dist/schema/payment-method-card-checks.js.map +1 -1
  71. package/dist/schema/payment-method-card-networks.js +4 -1
  72. package/dist/schema/payment-method-card-networks.js.map +1 -1
  73. package/dist/schema/payment-method-card-three-d-secure-usage.js +3 -1
  74. package/dist/schema/payment-method-card-three-d-secure-usage.js.map +1 -1
  75. package/dist/schema/payment-method-card-wallet-masterpass.js +4 -0
  76. package/dist/schema/payment-method-card-wallet-masterpass.js.map +1 -1
  77. package/dist/schema/payment-method-card-wallet-visa-checkout.js +4 -0
  78. package/dist/schema/payment-method-card-wallet-visa-checkout.js.map +1 -1
  79. package/dist/schema/payment-method-card-wallet.d.ts.map +1 -1
  80. package/dist/schema/payment-method-card-wallet.js +5 -1
  81. package/dist/schema/payment-method-card-wallet.js.map +1 -1
  82. package/dist/schema/payment-method-card.js +19 -4
  83. package/dist/schema/payment-method-card.js.map +1 -1
  84. package/dist/schema/payment-method.js +17 -5
  85. package/dist/schema/payment-method.js.map +1 -1
  86. package/dist/schema/payment-methods.d.ts.map +1 -1
  87. package/dist/schema/payment-methods.js +6 -2
  88. package/dist/schema/payment-methods.js.map +1 -1
  89. package/dist/schema/plan.js +39 -10
  90. package/dist/schema/plan.js.map +1 -1
  91. package/dist/schema/price.js +31 -8
  92. package/dist/schema/price.js.map +1 -1
  93. package/dist/schema/product.js +36 -8
  94. package/dist/schema/product.js.map +1 -1
  95. package/dist/schema/stripe.js +25 -0
  96. package/dist/schema/stripe.js.map +1 -1
  97. package/dist/schema/subscription-automatic-tax.js +3 -1
  98. package/dist/schema/subscription-automatic-tax.js.map +1 -1
  99. package/dist/schema/subscription-billing-thresholds.js +2 -0
  100. package/dist/schema/subscription-billing-thresholds.js.map +1 -1
  101. package/dist/schema/subscription-item-billing-thresholds.js +1 -0
  102. package/dist/schema/subscription-item-billing-thresholds.js.map +1 -1
  103. package/dist/schema/subscription-item.js +17 -4
  104. package/dist/schema/subscription-item.js.map +1 -1
  105. package/dist/schema/subscription-items.js +6 -2
  106. package/dist/schema/subscription-items.js.map +1 -1
  107. package/dist/schema/subscription.js +56 -13
  108. package/dist/schema/subscription.js.map +1 -1
  109. package/dist/schema/subscriptions.js +6 -2
  110. package/dist/schema/subscriptions.js.map +1 -1
  111. package/dist/schema/test-clock.js +22 -7
  112. package/dist/schema/test-clock.js.map +1 -1
  113. package/dist/types.d.ts +8 -0
  114. package/dist/types.d.ts.map +1 -1
  115. package/package.json +5 -6
@@ -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,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 +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,C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AAU,EAAE;YAC7B,WAAW,EAAE,iMAAiM;YAC9M,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE;YAC3B,WAAW,EAAE,8DAA8D;SAC5E,CAAC;QACF,2BAA2B;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"}
@@ -14,6 +14,31 @@ const builder_1 = require("../builder");
14
14
  const utils_1 = require("../utils");
15
15
  builder_1.builder.objectType('Stripe', {
16
16
  fields: (t) => ({
17
+ connectedAccounts: t.field({
18
+ type: 'StripeConnectedAccounts',
19
+ resolve: (_parent, _, context) => __awaiter(void 0, void 0, void 0, function* () {
20
+ const { isAdmin } = context;
21
+ if (!isAdmin)
22
+ throw new node_1.GraphQLYogaError('Not allowed');
23
+ const connectedAccounts = yield utils_1.stripe.accounts.list();
24
+ return connectedAccounts;
25
+ })
26
+ }),
27
+ connectedAccount: t.field({
28
+ type: 'StripeConnectedAccount',
29
+ args: {
30
+ id: t.arg.string({
31
+ required: true
32
+ })
33
+ },
34
+ resolve: (_parent, { id }, context) => __awaiter(void 0, void 0, void 0, function* () {
35
+ const { isAdmin } = context;
36
+ if (!isAdmin)
37
+ throw new node_1.GraphQLYogaError('Not allowed');
38
+ const connectedAccount = yield utils_1.stripe.accounts.retrieve(id);
39
+ return connectedAccount;
40
+ })
41
+ }),
17
42
  customer: t.field({
18
43
  type: 'StripeCustomer',
19
44
  args: {
@@ -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,CAAA,MAAM,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA,EAAE;oBACjC,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,C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AAA;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,CAAC;QACF,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE;YACrB,IAAI,EAAE,YAAY;SACnB,CAAC;QAC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AAC,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"}
@@ -14,37 +14,63 @@ const utils_1 = require("../utils");
14
14
  builder_1.builder.objectType('StripeSubscription', {
15
15
  description: '',
16
16
  fields: (t) => ({
17
- id: t.exposeString('id'),
18
- object: t.exposeString('object'),
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
+ }),
19
23
  // todo: application
20
24
  applicationFeePercent: t.exposeFloat('application_fee_percent', {
25
+ description: `A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.`,
21
26
  nullable: true
22
27
  }),
23
28
  automaticTax: t.expose('automatic_tax', {
24
29
  type: 'StripeSubscriptionAutomaticTax'
25
30
  }),
26
- billingCycleAnchor: t.exposeInt('billing_cycle_anchor'),
31
+ billingCycleAnchor: t.exposeInt('billing_cycle_anchor', {
32
+ description: `Determines the date of the first full invoice, and, for plans with \`month\` or \`year\` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.`
33
+ }),
27
34
  billingThresholds: t.expose('billing_thresholds', {
35
+ description: `Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period`,
28
36
  type: 'StripeSubscriptionBillingThresholds',
29
37
  nullable: true
30
38
  }),
31
39
  cancelAt: t.exposeInt('cancel_at', {
40
+ description: `A date in the future at which the subscription will automatically get canceled`,
32
41
  nullable: true
33
42
  }),
34
- cancelAtPeriodEnd: t.exposeBoolean('cancel_at_period_end'),
43
+ cancelAtPeriodEnd: t.exposeBoolean('cancel_at_period_end', {
44
+ description: `If the subscription has been canceled with the \`at_period_end\` flag set to \`true\`, \`cancel_at_period_end\` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period.`
45
+ }),
35
46
  canceledAt: t.exposeInt('canceled_at', {
47
+ description: `If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with \`cancel_at_period_end\`, \`canceled_at\` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.`,
36
48
  nullable: true
37
49
  }),
38
- collectionMethods: t.exposeString('collection_method'),
39
- created: t.exposeInt('created'),
40
- currency: t.exposeString('currency'),
41
- currentPeriodEnd: t.exposeInt('current_period_end'),
42
- currentPeriodStart: t.exposeInt('current_period_start'),
43
- customer: t.exposeString('customer'),
50
+ collectionMethods: t.exposeString('collection_method', {
51
+ description: `Either \`charge_automatically\`, or \`send_invoice\`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as \`active\`.`
52
+ }),
53
+ created: t.exposeInt('created', {
54
+ description: `Time at which the object was created. Measured in seconds since the Unix epoch.`
55
+ }),
56
+ currency: t.exposeString('currency', {
57
+ 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).`
58
+ }),
59
+ currentPeriodEnd: t.exposeInt('current_period_end', {
60
+ description: `End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.`
61
+ }),
62
+ currentPeriodStart: t.exposeInt('current_period_start', {
63
+ description: `Start of the current period that the subscription has been invoiced for.`
64
+ }),
65
+ customer: t.exposeString('customer', {
66
+ description: `ID of the customer who owns the subscription.`
67
+ }),
44
68
  daysUntilDue: t.exposeInt('days_until_due', {
69
+ description: `Number of days a customer has to pay invoices generated by this subscription. This value will be \`null\` for subscriptions where \`collection_method=charge_automatically\`.`,
45
70
  nullable: true
46
71
  }),
47
72
  defaultPaymentMethod: t.field({
73
+ description: `ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over \`default_source\`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).`,
48
74
  type: 'StripePaymentMethod',
49
75
  nullable: true,
50
76
  resolve: (subscription) => __awaiter(void 0, void 0, void 0, function* () {
@@ -61,20 +87,25 @@ builder_1.builder.objectType('StripeSubscription', {
61
87
  }),
62
88
  // todo: default source
63
89
  defaultTaxRates: t.expose('default_tax_rates', {
90
+ description: `The tax rates that will apply to any subscription item that does not have \`tax_rates\` set. Invoices created will have their \`default_tax_rates\` populated from the subscription.`,
64
91
  type: ['StripeTaxRate'],
65
92
  nullable: true
66
93
  }),
67
94
  description: t.exposeString('description', {
95
+ description: `The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces.`,
68
96
  nullable: true
69
97
  }),
70
98
  // TODO: discount
71
99
  endedAt: t.exposeInt('ended_at', {
100
+ description: `If the subscription has ended, the date the subscription ended.`,
72
101
  nullable: true
73
102
  }),
74
103
  items: t.expose('items', {
104
+ description: `List of subscription items, each with an attached price.`,
75
105
  type: 'StripeSubscriptionItems'
76
106
  }),
77
107
  latestInvoice: t.field({
108
+ description: `The most recent invoice this subscription has generated.`,
78
109
  type: 'StripeInvoice',
79
110
  nullable: true,
80
111
  resolve: (subscription) => __awaiter(void 0, void 0, void 0, function* () {
@@ -89,14 +120,19 @@ builder_1.builder.objectType('StripeSubscription', {
89
120
  return invoice;
90
121
  })
91
122
  }),
92
- livemode: t.exposeBoolean('livemode'),
123
+ livemode: t.exposeBoolean('livemode', {
124
+ description: `Has the value \`true\` if the object exists in live mode or the value \`false\` if the object exists in test mode.`
125
+ }),
93
126
  metadata: t.expose('metadata', {
127
+ 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.`,
94
128
  type: 'JSON'
95
129
  }),
96
130
  nextPendingInvoiceItemInvoice: t.exposeInt('next_pending_invoice_item_invoice', {
131
+ description: `Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at \`pending_invoice_item_interval\`.`,
97
132
  nullable: true
98
133
  }),
99
134
  pauseCollection: t.expose('pause_collection', {
135
+ description: `If specified, payment collection for this subscription will be paused.`,
100
136
  type: 'StripeSubscriptionPauseCollection',
101
137
  nullable: true
102
138
  }),
@@ -105,9 +141,14 @@ builder_1.builder.objectType('StripeSubscription', {
105
141
  // todo: pending_setup_intent
106
142
  // todo: pending_update
107
143
  // todo: schedule
108
- startDate: t.exposeInt('start_date'),
109
- status: t.exposeString('status'),
144
+ startDate: t.exposeInt('start_date', {
145
+ description: `Date when the subscription was first created. The date might differ from the \`created\` date due to backdating.`
146
+ }),
147
+ status: t.exposeString('status', {
148
+ description: `Possible values are \`incomplete\`, \`incomplete_expired\`, \`trialing\`, \`active\`, \`past_due\`, \`canceled\`, or \`unpaid\`.\n\nFor \`collection_method=charge_automatically\` a subscription moves into \`incomplete\` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an \`active\` state. If the first invoice is not paid within 23 hours, the subscription transitions to \`incomplete_expired\`. This is a terminal state, the open invoice will be voided and no further invoices will be generated.\n\nA subscription that is currently in a trial period is \`trialing\` and moves to \`active\` when the trial period is over.\n\nIf subscription \`collection_method=charge_automatically\` it becomes \`past_due\` when payment to renew it fails and \`canceled\` or \`unpaid\` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts.\n\nIf subscription \`collection_method=send_invoice\` it becomes \`past_due\` when its invoice is not paid by the due date, and \`canceled\` or \`unpaid\` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of \`unpaid\`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.`
149
+ }),
110
150
  testClock: t.field({
151
+ description: `ID of the test clock this subscription belongs to.`,
111
152
  type: 'StripeTestClock',
112
153
  nullable: true,
113
154
  resolve: (subscription) => __awaiter(void 0, void 0, void 0, function* () {
@@ -124,9 +165,11 @@ builder_1.builder.objectType('StripeSubscription', {
124
165
  }),
125
166
  // todo: transfer data
126
167
  trialEnd: t.exposeInt('trial_end', {
168
+ description: `If the subscription has a trial, the end of that trial.`,
127
169
  nullable: true
128
170
  }),
129
171
  trialStart: t.exposeInt('trial_start', {
172
+ description: `If the subscription has a trial, the beginning of that trial.`,
130
173
  nullable: true
131
174
  })
132
175
  })
@@ -1 +1 @@
1
- {"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../src/schema/subscription.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,wCAAoC;AAEpC,oCAAiC;AAEjC,iBAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE;IACvC,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,oBAAoB;QACpB,qBAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,yBAAyB,EAAE;YAC9D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,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yBAAyB;QACzB,sCAAsC;QACtC,6BAA6B;QAC7B,uBAAuB;QACvB,iBAAiB;QACjB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,YAAY,EAAE;YACnC,WAAW,EAAE,kHAAkH;SAChI,CAAC;QACF,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,QAAQ,EAAE;YAC/B,WAAW,EAAE,69CAA69C;SAC3+C,CAAC;QACF,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC;YACjB,WAAW,EAAE,oDAAoD;YACjE,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAO,YAAY,EAAE,EAAE;gBAC9B,MAAM,EAAE,UAAU,EAAE,GAAG,YAAY,CAAA;gBAEnC,IAAI,CAAC,UAAU,EAAE;oBACf,OAAO,IAAI,CAAA;iBACZ;gBAED,MAAM,SAAS,GAAG,MAAM,cAAM,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAoB,CAAC,CAAA;gBAEpF,IAAI,CAAC,SAAS,EAAE;oBACd,OAAO,IAAI,CAAA;iBACZ;gBAED,OAAO,SAAS,CAAA;YAClB,CAAC,CAAA;SACF,CAAC;QACF,sBAAsB;QACtB,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,WAAW,EAAE;YACjC,WAAW,EAAE,yDAAyD;YACtE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,CAAC,CAAC,SAAS,CAAC,aAAa,EAAE;YACrC,WAAW,EAAE,+DAA+D;YAC5E,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;CACH,CAAC,CAAA"}
@@ -4,8 +4,12 @@ const builder_1 = require("../builder");
4
4
  builder_1.builder.objectType('StripeSubscriptions', {
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: ['StripeSubscription'],
11
15
  nullable: false
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../src/schema/subscriptions.ts"],"names":[],"mappings":";;AAAA,wCAAoC;AAEpC,iBAAO,CAAC,UAAU,CAAC,qBAAqB,EAAE;IACxC,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,oBAAoB,CAAC;YAC5B,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH,CAAC;CACH,CAAC,CAAA"}
1
+ {"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../src/schema/subscriptions.ts"],"names":[],"mappings":";;AAAA,wCAAoC;AAEpC,iBAAO,CAAC,UAAU,CAAC,qBAAqB,EAAE;IACxC,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,oBAAoB,CAAC;YAC5B,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH,CAAC;CACH,CAAC,CAAA"}
@@ -4,16 +4,31 @@ const builder_1 = require("../builder");
4
4
  builder_1.builder.objectType('StripeTestClock', {
5
5
  description: '',
6
6
  fields: (t) => ({
7
- id: t.exposeString('id'),
8
- object: t.exposeString('object'),
9
- created: t.exposeInt('created'),
10
- deletesAfter: t.exposeInt('deletes_after'),
11
- frozenTime: t.exposeInt('frozen_time'),
12
- livemode: t.exposeBoolean('livemode'),
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
+ }),
13
+ created: t.exposeInt('created', {
14
+ description: `Time at which the object was created. Measured in seconds since the Unix epoch.`
15
+ }),
16
+ deletesAfter: t.exposeInt('deletes_after', {
17
+ description: `Time at which this clock is scheduled to auto delete.`
18
+ }),
19
+ frozenTime: t.exposeInt('frozen_time', {
20
+ description: `Time at which all objects belonging to this clock are frozen.`
21
+ }),
22
+ livemode: t.exposeBoolean('livemode', {
23
+ description: `Has the value \`true\` if the object exists in live mode or the value \`false\` if the object exists in test mode.`
24
+ }),
13
25
  name: t.exposeString('name', {
26
+ description: `The custom name supplied at creation.`,
14
27
  nullable: true
15
28
  }),
16
- status: t.exposeString('status')
29
+ status: t.exposeString('status', {
30
+ description: `The status of the Test Clock.`
31
+ })
17
32
  })
18
33
  });
19
34
  //# sourceMappingURL=test-clock.js.map