@soltech/fluid-common 1.9.2-sc23265.3 → 1.10.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -118,7 +118,6 @@ export type TransactionStatusSource = 'gateway' | 'fluid';
118
118
  export interface TransactionStatusCheck {
119
119
  url: string;
120
120
  intervalSeconds: number;
121
- /** Who answers the poll. Absent on wallets served by an API that predates this field. */
122
121
  source?: TransactionStatusSource;
123
122
  }
124
123
  export interface AllPaymentMethods {
@@ -162,12 +161,12 @@ export interface EncryptionSettings {
162
161
  expiryDateEncryptionMode: ExpiryDateEncryptionMode;
163
162
  encryptCardholderName: boolean;
164
163
  }
165
- export type HostedFieldsSettings = EncryptedFieldsSettings | CardTokenSettings;
164
+ export type HostedFieldsSettings = CardValuesSettings | CardTokenSettings;
166
165
  interface HostedFieldsBase {
167
166
  url: string;
168
167
  }
169
- export interface EncryptedFieldsSettings extends HostedFieldsBase {
170
- protocol?: HostedFieldsProtocol.ENCRYPTED_FIELDS;
168
+ export interface CardValuesSettings extends HostedFieldsBase {
169
+ protocol?: HostedFieldsProtocol.CARD_VALUES;
171
170
  }
172
171
  export interface CardTokenSettings extends HostedFieldsBase {
173
172
  protocol: HostedFieldsProtocol.CARD_TOKEN;
@@ -178,7 +177,7 @@ export interface CardTokenParams {
178
177
  env: string;
179
178
  }
180
179
  export declare enum HostedFieldsProtocol {
181
- ENCRYPTED_FIELDS = "EncryptedFields",
180
+ CARD_VALUES = "CardValues",
182
181
  CARD_TOKEN = "CardToken"
183
182
  }
184
183
  export declare enum EncryptionType {
@@ -254,15 +253,36 @@ export interface CreditcardTransactionParams extends TransactionParams {
254
253
  protectionHeaders?: Record<string, string>;
255
254
  }
256
255
  /**
257
- * Transaction params for any payment method whose payload is keyed dynamically:
258
- * - CMS-defined input fields (bank transfer, crypto, e-wallet, voucher).
259
- * - Native flows like Apple Pay where the gateway-bound `token` is the only
260
- * extra key beyond the base TransactionParams.
256
+ * Transaction params for any payment method whose payload is keyed dynamically by
257
+ * CMS-defined input fields (bank transfer, crypto, e-wallet, voucher).
261
258
  * Field keys typically come from `PaymentMethod.inputFields[].paramName`.
262
259
  */
263
260
  export interface DynamicTransactionParams extends TransactionParams {
264
261
  [key: string]: string | number | undefined;
265
262
  }
263
+ export interface ApplePayTransactionParams extends TransactionParams {
264
+ /** The authorised `ApplePayPaymentToken`, serialised, opaque to everything but the gateway. */
265
+ token: string;
266
+ billingContact?: ApplePayBillingContact;
267
+ }
268
+ /**
269
+ * Apple's own `ApplePayPaymentContact` shape, carried through unchanged: a gateway that wants
270
+ * it expects the field names Apple uses. Only present when the method asks the sheet for it.
271
+ */
272
+ export interface ApplePayBillingContact {
273
+ addressLines?: string[];
274
+ administrativeArea?: string;
275
+ country?: string;
276
+ countryCode?: string;
277
+ emailAddress?: string;
278
+ familyName?: string;
279
+ givenName?: string;
280
+ locality?: string;
281
+ phoneNumber?: string;
282
+ postalCode?: string;
283
+ subAdministrativeArea?: string;
284
+ subLocality?: string;
285
+ }
266
286
  export interface TransactionOptions {
267
287
  bonusCode?: string;
268
288
  activityId?: string;
package/lib/index.js CHANGED
@@ -36,7 +36,7 @@ export var WindowRedirectType;
36
36
  // is behind them — the gateway's identity stays server-side.
37
37
  export var HostedFieldsProtocol;
38
38
  (function (HostedFieldsProtocol) {
39
- HostedFieldsProtocol["ENCRYPTED_FIELDS"] = "EncryptedFields";
39
+ HostedFieldsProtocol["CARD_VALUES"] = "CardValues";
40
40
  HostedFieldsProtocol["CARD_TOKEN"] = "CardToken";
41
41
  })(HostedFieldsProtocol || (HostedFieldsProtocol = {}));
42
42
  export var EncryptionType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soltech/fluid-common",
3
- "version": "1.9.2-sc23265.3",
3
+ "version": "1.10.0-beta.0",
4
4
  "type": "module",
5
5
  "description": "Fluid frontend, API and AI common interfaces & enums",
6
6
  "main": "lib/index.js",
package/src/index.ts CHANGED
@@ -134,7 +134,6 @@ export type TransactionStatusSource = 'gateway' | 'fluid';
134
134
  export interface TransactionStatusCheck {
135
135
  url: string;
136
136
  intervalSeconds: number;
137
- /** Who answers the poll. Absent on wallets served by an API that predates this field. */
138
137
  source?: TransactionStatusSource;
139
138
  }
140
139
 
@@ -183,21 +182,20 @@ export interface EncryptionSettings {
183
182
  encryptCardholderName: boolean;
184
183
  }
185
184
 
186
- export type HostedFieldsSettings = EncryptedFieldsSettings | CardTokenSettings;
185
+ export type HostedFieldsSettings = CardValuesSettings | CardTokenSettings;
187
186
 
188
187
  interface HostedFieldsBase {
189
188
  // Its presence is also how the client decides a method uses hosted fields at all.
190
189
  url: string;
191
190
  }
192
191
 
193
- export interface EncryptedFieldsSettings extends HostedFieldsBase {
194
- // Absent means EncryptedFields, so responses composed before this field existed keep working.
195
- protocol?: HostedFieldsProtocol.ENCRYPTED_FIELDS;
192
+ export interface CardValuesSettings extends HostedFieldsBase {
193
+ // Absent selects this protocol, so responses composed before the field existed keep working.
194
+ protocol?: HostedFieldsProtocol.CARD_VALUES;
196
195
  }
197
196
 
198
197
  export interface CardTokenSettings extends HostedFieldsBase {
199
198
  protocol: HostedFieldsProtocol.CARD_TOKEN;
200
- // Handed straight to the gateway's own component, uninterpreted.
201
199
  params: CardTokenParams;
202
200
  }
203
201
 
@@ -209,7 +207,7 @@ export interface CardTokenParams {
209
207
  // Which message contract the client must speak to the hosted fields, not which gateway
210
208
  // is behind them — the gateway's identity stays server-side.
211
209
  export enum HostedFieldsProtocol {
212
- ENCRYPTED_FIELDS = 'EncryptedFields',
210
+ CARD_VALUES = 'CardValues',
213
211
  CARD_TOKEN = 'CardToken'
214
212
  }
215
213
 
@@ -291,24 +289,44 @@ export interface CreditcardTransactionParams extends TransactionParams {
291
289
  expiryMonth?: string;
292
290
  expiryYear?: string;
293
291
  expiryDate?: string;
294
- // Set instead of cardNumber when the gateway tokenised the card in the browser.
295
292
  cardToken?: string;
296
- // Device and session signals the gateway's own form collected, which its fraud scoring
297
- // needs on the charge. Opaque: the client passes them through and never interprets them.
298
293
  protectionHeaders?: Record<string, string>;
299
294
  }
300
295
 
301
296
  /**
302
- * Transaction params for any payment method whose payload is keyed dynamically:
303
- * - CMS-defined input fields (bank transfer, crypto, e-wallet, voucher).
304
- * - Native flows like Apple Pay where the gateway-bound `token` is the only
305
- * extra key beyond the base TransactionParams.
297
+ * Transaction params for any payment method whose payload is keyed dynamically by
298
+ * CMS-defined input fields (bank transfer, crypto, e-wallet, voucher).
306
299
  * Field keys typically come from `PaymentMethod.inputFields[].paramName`.
307
300
  */
308
301
  export interface DynamicTransactionParams extends TransactionParams {
309
302
  [key: string]: string | number | undefined;
310
303
  }
311
304
 
305
+ export interface ApplePayTransactionParams extends TransactionParams {
306
+ /** The authorised `ApplePayPaymentToken`, serialised, opaque to everything but the gateway. */
307
+ token: string;
308
+ billingContact?: ApplePayBillingContact;
309
+ }
310
+
311
+ /**
312
+ * Apple's own `ApplePayPaymentContact` shape, carried through unchanged: a gateway that wants
313
+ * it expects the field names Apple uses. Only present when the method asks the sheet for it.
314
+ */
315
+ export interface ApplePayBillingContact {
316
+ addressLines?: string[];
317
+ administrativeArea?: string;
318
+ country?: string;
319
+ countryCode?: string;
320
+ emailAddress?: string;
321
+ familyName?: string;
322
+ givenName?: string;
323
+ locality?: string;
324
+ phoneNumber?: string;
325
+ postalCode?: string;
326
+ subAdministrativeArea?: string;
327
+ subLocality?: string;
328
+ }
329
+
312
330
  export interface TransactionOptions {
313
331
  bonusCode?: string;
314
332
  activityId?: string;
@@ -1,7 +0,0 @@
1
- {
2
- "enabledMcpjsonServers": [
3
- "shortcut",
4
- "playwright"
5
- ],
6
- "enableAllProjectMcpServers": true
7
- }