@gr4vy/sdk 1.1.44 → 1.1.46

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 (72) hide show
  1. package/docs/sdks/digitalwallets/README.md +4 -4
  2. package/docs/sdks/domains/README.md +4 -4
  3. package/docs/sdks/giftcards/README.md +4 -4
  4. package/docs/sdks/merchantaccounts/README.md +4 -0
  5. package/docs/sdks/paymentservices/README.md +4 -4
  6. package/docs/sdks/shippingdetails/README.md +4 -4
  7. package/examples/package-lock.json +1 -1
  8. package/funcs/buyersShippingDetailsDelete.d.ts +1 -1
  9. package/funcs/buyersShippingDetailsDelete.d.ts.map +1 -1
  10. package/funcs/buyersShippingDetailsDelete.js +1 -1
  11. package/funcs/buyersShippingDetailsDelete.js.map +1 -1
  12. package/funcs/digitalWalletsDelete.d.ts +1 -1
  13. package/funcs/digitalWalletsDelete.d.ts.map +1 -1
  14. package/funcs/digitalWalletsDelete.js +1 -1
  15. package/funcs/digitalWalletsDelete.js.map +1 -1
  16. package/funcs/digitalWalletsDomainsDelete.d.ts +1 -1
  17. package/funcs/digitalWalletsDomainsDelete.d.ts.map +1 -1
  18. package/funcs/digitalWalletsDomainsDelete.js +1 -1
  19. package/funcs/digitalWalletsDomainsDelete.js.map +1 -1
  20. package/funcs/giftCardsDelete.d.ts +1 -1
  21. package/funcs/giftCardsDelete.d.ts.map +1 -1
  22. package/funcs/giftCardsDelete.js +1 -1
  23. package/funcs/giftCardsDelete.js.map +1 -1
  24. package/funcs/paymentServicesDelete.d.ts +1 -1
  25. package/funcs/paymentServicesDelete.d.ts.map +1 -1
  26. package/funcs/paymentServicesDelete.js +1 -1
  27. package/funcs/paymentServicesDelete.js.map +1 -1
  28. package/jsr.json +1 -1
  29. package/lib/config.d.ts +2 -2
  30. package/lib/config.js +2 -2
  31. package/models/components/cartitem.d.ts +31 -1
  32. package/models/components/cartitem.d.ts.map +1 -1
  33. package/models/components/cartitem.js +22 -0
  34. package/models/components/cartitem.js.map +1 -1
  35. package/models/components/merchantaccount.d.ts +5 -0
  36. package/models/components/merchantaccount.d.ts.map +1 -1
  37. package/models/components/merchantaccount.js +4 -0
  38. package/models/components/merchantaccount.js.map +1 -1
  39. package/models/components/merchantaccountcreate.d.ts +5 -0
  40. package/models/components/merchantaccountcreate.d.ts.map +1 -1
  41. package/models/components/merchantaccountcreate.js +4 -0
  42. package/models/components/merchantaccountcreate.js.map +1 -1
  43. package/models/components/merchantaccountupdate.d.ts +5 -0
  44. package/models/components/merchantaccountupdate.d.ts.map +1 -1
  45. package/models/components/merchantaccountupdate.js +4 -0
  46. package/models/components/merchantaccountupdate.js.map +1 -1
  47. package/package.json +1 -1
  48. package/sdk/digitalwallets.d.ts +1 -1
  49. package/sdk/digitalwallets.d.ts.map +1 -1
  50. package/sdk/domains.d.ts +1 -1
  51. package/sdk/domains.d.ts.map +1 -1
  52. package/sdk/giftcards.d.ts +1 -1
  53. package/sdk/giftcards.d.ts.map +1 -1
  54. package/sdk/paymentservices.d.ts +1 -1
  55. package/sdk/paymentservices.d.ts.map +1 -1
  56. package/sdk/shippingdetails.d.ts +1 -1
  57. package/sdk/shippingdetails.d.ts.map +1 -1
  58. package/src/funcs/buyersShippingDetailsDelete.ts +4 -4
  59. package/src/funcs/digitalWalletsDelete.ts +4 -4
  60. package/src/funcs/digitalWalletsDomainsDelete.ts +4 -4
  61. package/src/funcs/giftCardsDelete.ts +4 -4
  62. package/src/funcs/paymentServicesDelete.ts +4 -4
  63. package/src/lib/config.ts +2 -2
  64. package/src/models/components/cartitem.ts +53 -1
  65. package/src/models/components/merchantaccount.ts +9 -0
  66. package/src/models/components/merchantaccountcreate.ts +9 -0
  67. package/src/models/components/merchantaccountupdate.ts +9 -0
  68. package/src/sdk/digitalwallets.ts +1 -1
  69. package/src/sdk/domains.ts +1 -1
  70. package/src/sdk/giftcards.ts +1 -1
  71. package/src/sdk/paymentservices.ts +1 -1
  72. package/src/sdk/shippingdetails.ts +1 -1
@@ -39,7 +39,7 @@ export function paymentServicesDelete(
39
39
  options?: RequestOptions,
40
40
  ): APIPromise<
41
41
  Result<
42
- any,
42
+ void,
43
43
  | errors.Error400
44
44
  | errors.Error401
45
45
  | errors.Error403
@@ -78,7 +78,7 @@ async function $do(
78
78
  ): Promise<
79
79
  [
80
80
  Result<
81
- any,
81
+ void,
82
82
  | errors.Error400
83
83
  | errors.Error401
84
84
  | errors.Error403
@@ -204,7 +204,7 @@ async function $do(
204
204
  };
205
205
 
206
206
  const [result] = await M.match<
207
- any,
207
+ void,
208
208
  | errors.Error400
209
209
  | errors.Error401
210
210
  | errors.Error403
@@ -226,7 +226,7 @@ async function $do(
226
226
  | UnexpectedClientError
227
227
  | SDKValidationError
228
228
  >(
229
- M.json(200, z.any()),
229
+ M.nil(204, z.void()),
230
230
  M.jsonErr(400, errors.Error400$inboundSchema),
231
231
  M.jsonErr(401, errors.Error401$inboundSchema),
232
232
  M.jsonErr(403, errors.Error403$inboundSchema),
package/src/lib/config.ts CHANGED
@@ -77,7 +77,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
77
77
  export const SDK_METADATA = {
78
78
  language: "typescript",
79
79
  openapiDocVersion: "1.0.0",
80
- sdkVersion: "1.1.44",
80
+ sdkVersion: "1.1.46",
81
81
  genVersion: "2.698.4",
82
- userAgent: "speakeasy-sdk/typescript 1.1.44 2.698.4 1.0.0 @gr4vy/sdk",
82
+ userAgent: "speakeasy-sdk/typescript 1.1.46 2.698.4 1.0.0 @gr4vy/sdk",
83
83
  } as const;
@@ -39,7 +39,7 @@ export type CartItem = {
39
39
  */
40
40
  externalIdentifier?: string | null | undefined;
41
41
  /**
42
- * The SKU for the item.
42
+ * The SKU or product code for the item.
43
43
  */
44
44
  sku?: string | null | undefined;
45
45
  /**
@@ -62,6 +62,30 @@ export type CartItem = {
62
62
  * The seller country of the cart item.
63
63
  */
64
64
  sellerCountry?: string | null | undefined;
65
+ /**
66
+ * Whether the item is exempt of tax.
67
+ */
68
+ taxExempt?: boolean | null | undefined;
69
+ /**
70
+ * The unit of measure or the unit of measure code.
71
+ */
72
+ unitOfMeasure?: string | null | undefined;
73
+ /**
74
+ * Item commodity code. Generally a UNSPSC code.
75
+ */
76
+ commodityCode?: string | null | undefined;
77
+ /**
78
+ * Brief item description.
79
+ */
80
+ description?: string | null | undefined;
81
+ /**
82
+ * Item import or export duties represented as a monetary amount in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`
83
+ */
84
+ dutyAmount?: number | null | undefined;
85
+ /**
86
+ * Freight/shipping amount represented as a monetary amount in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`
87
+ */
88
+ shippingAmount?: number | null | undefined;
65
89
  };
66
90
 
67
91
  /** @internal */
@@ -82,6 +106,12 @@ export const CartItem$inboundSchema: z.ZodType<
82
106
  categories: z.nullable(z.array(z.string())).optional(),
83
107
  product_type: z.nullable(ProductType$inboundSchema).optional(),
84
108
  seller_country: z.nullable(z.string()).optional(),
109
+ tax_exempt: z.nullable(z.boolean()).optional(),
110
+ unit_of_measure: z.nullable(z.string()).optional(),
111
+ commodity_code: z.nullable(z.string()).optional(),
112
+ description: z.nullable(z.string()).optional(),
113
+ duty_amount: z.nullable(z.number().int()).optional(),
114
+ shipping_amount: z.nullable(z.number().int()).optional(),
85
115
  }).transform((v) => {
86
116
  return remap$(v, {
87
117
  "unit_amount": "unitAmount",
@@ -92,6 +122,11 @@ export const CartItem$inboundSchema: z.ZodType<
92
122
  "image_url": "imageUrl",
93
123
  "product_type": "productType",
94
124
  "seller_country": "sellerCountry",
125
+ "tax_exempt": "taxExempt",
126
+ "unit_of_measure": "unitOfMeasure",
127
+ "commodity_code": "commodityCode",
128
+ "duty_amount": "dutyAmount",
129
+ "shipping_amount": "shippingAmount",
95
130
  });
96
131
  });
97
132
 
@@ -109,6 +144,12 @@ export type CartItem$Outbound = {
109
144
  categories?: Array<string> | null | undefined;
110
145
  product_type?: string | null | undefined;
111
146
  seller_country?: string | null | undefined;
147
+ tax_exempt?: boolean | null | undefined;
148
+ unit_of_measure?: string | null | undefined;
149
+ commodity_code?: string | null | undefined;
150
+ description?: string | null | undefined;
151
+ duty_amount?: number | null | undefined;
152
+ shipping_amount?: number | null | undefined;
112
153
  };
113
154
 
114
155
  /** @internal */
@@ -129,6 +170,12 @@ export const CartItem$outboundSchema: z.ZodType<
129
170
  categories: z.nullable(z.array(z.string())).optional(),
130
171
  productType: z.nullable(ProductType$outboundSchema).optional(),
131
172
  sellerCountry: z.nullable(z.string()).optional(),
173
+ taxExempt: z.nullable(z.boolean()).optional(),
174
+ unitOfMeasure: z.nullable(z.string()).optional(),
175
+ commodityCode: z.nullable(z.string()).optional(),
176
+ description: z.nullable(z.string()).optional(),
177
+ dutyAmount: z.nullable(z.number().int()).optional(),
178
+ shippingAmount: z.nullable(z.number().int()).optional(),
132
179
  }).transform((v) => {
133
180
  return remap$(v, {
134
181
  unitAmount: "unit_amount",
@@ -139,6 +186,11 @@ export const CartItem$outboundSchema: z.ZodType<
139
186
  imageUrl: "image_url",
140
187
  productType: "product_type",
141
188
  sellerCountry: "seller_country",
189
+ taxExempt: "tax_exempt",
190
+ unitOfMeasure: "unit_of_measure",
191
+ commodityCode: "commodity_code",
192
+ dutyAmount: "duty_amount",
193
+ shippingAmount: "shipping_amount",
142
194
  });
143
195
  });
144
196
 
@@ -90,6 +90,10 @@ export type MerchantAccount = {
90
90
  * Application ID provided for Mastercard after onboarding to use Network Tokens.
91
91
  */
92
92
  mastercardNetworkTokensAppId?: string | null | undefined;
93
+ /**
94
+ * When enabled network tokens will be generated asynchronously and only used on subsequent transactions to speed up transaction processing.
95
+ */
96
+ asyncNetworkTokensEnabled?: boolean | undefined;
93
97
  /**
94
98
  * The date this merchant account was created at.
95
99
  */
@@ -126,6 +130,7 @@ export const MerchantAccount$inboundSchema: z.ZodType<
126
130
  amex_network_tokens_app_id: z.nullable(z.string()).optional(),
127
131
  mastercard_network_tokens_requestor_id: z.nullable(z.string()).optional(),
128
132
  mastercard_network_tokens_app_id: z.nullable(z.string()).optional(),
133
+ async_network_tokens_enabled: z.boolean().default(false),
129
134
  created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
130
135
  updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
131
136
  }).transform((v) => {
@@ -152,6 +157,7 @@ export const MerchantAccount$inboundSchema: z.ZodType<
152
157
  "mastercard_network_tokens_requestor_id":
153
158
  "mastercardNetworkTokensRequestorId",
154
159
  "mastercard_network_tokens_app_id": "mastercardNetworkTokensAppId",
160
+ "async_network_tokens_enabled": "asyncNetworkTokensEnabled",
155
161
  "created_at": "createdAt",
156
162
  "updated_at": "updatedAt",
157
163
  });
@@ -178,6 +184,7 @@ export type MerchantAccount$Outbound = {
178
184
  amex_network_tokens_app_id?: string | null | undefined;
179
185
  mastercard_network_tokens_requestor_id?: string | null | undefined;
180
186
  mastercard_network_tokens_app_id?: string | null | undefined;
187
+ async_network_tokens_enabled: boolean;
181
188
  created_at: string;
182
189
  updated_at: string;
183
190
  };
@@ -208,6 +215,7 @@ export const MerchantAccount$outboundSchema: z.ZodType<
208
215
  amexNetworkTokensAppId: z.nullable(z.string()).optional(),
209
216
  mastercardNetworkTokensRequestorId: z.nullable(z.string()).optional(),
210
217
  mastercardNetworkTokensAppId: z.nullable(z.string()).optional(),
218
+ asyncNetworkTokensEnabled: z.boolean().default(false),
211
219
  createdAt: z.date().transform(v => v.toISOString()),
212
220
  updatedAt: z.date().transform(v => v.toISOString()),
213
221
  }).transform((v) => {
@@ -234,6 +242,7 @@ export const MerchantAccount$outboundSchema: z.ZodType<
234
242
  mastercardNetworkTokensRequestorId:
235
243
  "mastercard_network_tokens_requestor_id",
236
244
  mastercardNetworkTokensAppId: "mastercard_network_tokens_app_id",
245
+ asyncNetworkTokensEnabled: "async_network_tokens_enabled",
237
246
  createdAt: "created_at",
238
247
  updatedAt: "updated_at",
239
248
  });
@@ -78,6 +78,10 @@ export type MerchantAccountCreate = {
78
78
  * Application ID provided for Mastercard after onboarding to use Network Tokens.
79
79
  */
80
80
  mastercardNetworkTokensAppId?: string | null | undefined;
81
+ /**
82
+ * When enabled network tokens will be generated asynchronously and only used on subsequent transactions to speed up transaction processing.
83
+ */
84
+ asyncNetworkTokensEnabled?: boolean | undefined;
81
85
  /**
82
86
  * The ID for the merchant account.
83
87
  */
@@ -111,6 +115,7 @@ export const MerchantAccountCreate$inboundSchema: z.ZodType<
111
115
  amex_network_tokens_app_id: z.nullable(z.string()).optional(),
112
116
  mastercard_network_tokens_requestor_id: z.nullable(z.string()).optional(),
113
117
  mastercard_network_tokens_app_id: z.nullable(z.string()).optional(),
118
+ async_network_tokens_enabled: z.boolean().default(false),
114
119
  id: z.string(),
115
120
  display_name: z.string(),
116
121
  }).transform((v) => {
@@ -136,6 +141,7 @@ export const MerchantAccountCreate$inboundSchema: z.ZodType<
136
141
  "mastercard_network_tokens_requestor_id":
137
142
  "mastercardNetworkTokensRequestorId",
138
143
  "mastercard_network_tokens_app_id": "mastercardNetworkTokensAppId",
144
+ "async_network_tokens_enabled": "asyncNetworkTokensEnabled",
139
145
  "display_name": "displayName",
140
146
  });
141
147
  });
@@ -158,6 +164,7 @@ export type MerchantAccountCreate$Outbound = {
158
164
  amex_network_tokens_app_id?: string | null | undefined;
159
165
  mastercard_network_tokens_requestor_id?: string | null | undefined;
160
166
  mastercard_network_tokens_app_id?: string | null | undefined;
167
+ async_network_tokens_enabled: boolean;
161
168
  id: string;
162
169
  display_name: string;
163
170
  };
@@ -185,6 +192,7 @@ export const MerchantAccountCreate$outboundSchema: z.ZodType<
185
192
  amexNetworkTokensAppId: z.nullable(z.string()).optional(),
186
193
  mastercardNetworkTokensRequestorId: z.nullable(z.string()).optional(),
187
194
  mastercardNetworkTokensAppId: z.nullable(z.string()).optional(),
195
+ asyncNetworkTokensEnabled: z.boolean().default(false),
188
196
  id: z.string(),
189
197
  displayName: z.string(),
190
198
  }).transform((v) => {
@@ -210,6 +218,7 @@ export const MerchantAccountCreate$outboundSchema: z.ZodType<
210
218
  mastercardNetworkTokensRequestorId:
211
219
  "mastercard_network_tokens_requestor_id",
212
220
  mastercardNetworkTokensAppId: "mastercard_network_tokens_app_id",
221
+ asyncNetworkTokensEnabled: "async_network_tokens_enabled",
213
222
  displayName: "display_name",
214
223
  });
215
224
  });
@@ -78,6 +78,10 @@ export type MerchantAccountUpdate = {
78
78
  * Application ID provided for Mastercard after onboarding to use Network Tokens.
79
79
  */
80
80
  mastercardNetworkTokensAppId?: string | null | undefined;
81
+ /**
82
+ * When enabled network tokens will be generated asynchronously and only used on subsequent transactions to speed up transaction processing.
83
+ */
84
+ asyncNetworkTokensEnabled?: boolean | undefined;
81
85
  /**
82
86
  * The display name for the merchant account.
83
87
  */
@@ -107,6 +111,7 @@ export const MerchantAccountUpdate$inboundSchema: z.ZodType<
107
111
  amex_network_tokens_app_id: z.nullable(z.string()).optional(),
108
112
  mastercard_network_tokens_requestor_id: z.nullable(z.string()).optional(),
109
113
  mastercard_network_tokens_app_id: z.nullable(z.string()).optional(),
114
+ async_network_tokens_enabled: z.boolean().default(false),
110
115
  display_name: z.nullable(z.string()).optional(),
111
116
  }).transform((v) => {
112
117
  return remap$(v, {
@@ -131,6 +136,7 @@ export const MerchantAccountUpdate$inboundSchema: z.ZodType<
131
136
  "mastercard_network_tokens_requestor_id":
132
137
  "mastercardNetworkTokensRequestorId",
133
138
  "mastercard_network_tokens_app_id": "mastercardNetworkTokensAppId",
139
+ "async_network_tokens_enabled": "asyncNetworkTokensEnabled",
134
140
  "display_name": "displayName",
135
141
  });
136
142
  });
@@ -153,6 +159,7 @@ export type MerchantAccountUpdate$Outbound = {
153
159
  amex_network_tokens_app_id?: string | null | undefined;
154
160
  mastercard_network_tokens_requestor_id?: string | null | undefined;
155
161
  mastercard_network_tokens_app_id?: string | null | undefined;
162
+ async_network_tokens_enabled: boolean;
156
163
  display_name?: string | null | undefined;
157
164
  };
158
165
 
@@ -179,6 +186,7 @@ export const MerchantAccountUpdate$outboundSchema: z.ZodType<
179
186
  amexNetworkTokensAppId: z.nullable(z.string()).optional(),
180
187
  mastercardNetworkTokensRequestorId: z.nullable(z.string()).optional(),
181
188
  mastercardNetworkTokensAppId: z.nullable(z.string()).optional(),
189
+ asyncNetworkTokensEnabled: z.boolean().default(false),
182
190
  displayName: z.nullable(z.string()).optional(),
183
191
  }).transform((v) => {
184
192
  return remap$(v, {
@@ -203,6 +211,7 @@ export const MerchantAccountUpdate$outboundSchema: z.ZodType<
203
211
  mastercardNetworkTokensRequestorId:
204
212
  "mastercard_network_tokens_requestor_id",
205
213
  mastercardNetworkTokensAppId: "mastercard_network_tokens_app_id",
214
+ asyncNetworkTokensEnabled: "async_network_tokens_enabled",
206
215
  displayName: "display_name",
207
216
  });
208
217
  });
@@ -89,7 +89,7 @@ export class DigitalWallets extends ClientSDK {
89
89
  digitalWalletId: string,
90
90
  merchantAccountId?: string | null | undefined,
91
91
  options?: RequestOptions,
92
- ): Promise<any> {
92
+ ): Promise<void> {
93
93
  return unwrapAsync(digitalWalletsDelete(
94
94
  this,
95
95
  digitalWalletId,
@@ -41,7 +41,7 @@ export class Domains extends ClientSDK {
41
41
  digitalWalletId: string,
42
42
  merchantAccountId?: string | null | undefined,
43
43
  options?: RequestOptions,
44
- ): Promise<any> {
44
+ ): Promise<void> {
45
45
  return unwrapAsync(digitalWalletsDomainsDelete(
46
46
  this,
47
47
  digitalWalletDomain,
@@ -48,7 +48,7 @@ export class GiftCards extends ClientSDK {
48
48
  giftCardId: string,
49
49
  merchantAccountId?: string | null | undefined,
50
50
  options?: RequestOptions,
51
- ): Promise<any> {
51
+ ): Promise<void> {
52
52
  return unwrapAsync(giftCardsDelete(
53
53
  this,
54
54
  giftCardId,
@@ -104,7 +104,7 @@ export class PaymentServices extends ClientSDK {
104
104
  paymentServiceId: string,
105
105
  merchantAccountId?: string | null | undefined,
106
106
  options?: RequestOptions,
107
- ): Promise<any> {
107
+ ): Promise<void> {
108
108
  return unwrapAsync(paymentServicesDelete(
109
109
  this,
110
110
  paymentServiceId,
@@ -107,7 +107,7 @@ export class ShippingDetails extends ClientSDK {
107
107
  shippingDetailsId: string,
108
108
  merchantAccountId?: string | null | undefined,
109
109
  options?: RequestOptions,
110
- ): Promise<any> {
110
+ ): Promise<void> {
111
111
  return unwrapAsync(buyersShippingDetailsDelete(
112
112
  this,
113
113
  buyerId,