tupay 0.9.0 → 0.10.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/dist/cjs/errors.d.ts +36 -0
- package/dist/cjs/errors.d.ts.map +1 -1
- package/dist/cjs/errors.js +49 -19
- package/dist/cjs/errors.js.map +1 -1
- package/dist/cjs/index.d.ts +34 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +42 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/resources/checkout-sessions.d.ts +85 -0
- package/dist/cjs/resources/checkout-sessions.d.ts.map +1 -0
- package/dist/cjs/resources/checkout-sessions.js +69 -0
- package/dist/cjs/resources/checkout-sessions.js.map +1 -0
- package/dist/cjs/resources/customers.d.ts +80 -0
- package/dist/cjs/resources/customers.d.ts.map +1 -0
- package/dist/cjs/resources/customers.js +77 -0
- package/dist/cjs/resources/customers.js.map +1 -0
- package/dist/cjs/resources/payment-intents.d.ts +27 -0
- package/dist/cjs/resources/payment-intents.d.ts.map +1 -1
- package/dist/cjs/resources/payment-intents.js.map +1 -1
- package/dist/cjs/resources/payment-links.d.ts +26 -1
- package/dist/cjs/resources/payment-links.d.ts.map +1 -1
- package/dist/cjs/resources/payment-links.js.map +1 -1
- package/dist/cjs/resources/payment-methods.d.ts +76 -0
- package/dist/cjs/resources/payment-methods.d.ts.map +1 -0
- package/dist/cjs/resources/payment-methods.js +77 -0
- package/dist/cjs/resources/payment-methods.js.map +1 -0
- package/dist/cjs/resources/prices.d.ts +73 -0
- package/dist/cjs/resources/prices.d.ts.map +1 -0
- package/dist/cjs/resources/prices.js +78 -0
- package/dist/cjs/resources/prices.js.map +1 -0
- package/dist/cjs/resources/products.d.ts +56 -0
- package/dist/cjs/resources/products.d.ts.map +1 -0
- package/dist/cjs/resources/products.js +70 -0
- package/dist/cjs/resources/products.js.map +1 -0
- package/dist/cjs/resources/receipts.d.ts +40 -0
- package/dist/cjs/resources/receipts.d.ts.map +1 -0
- package/dist/cjs/resources/receipts.js +49 -0
- package/dist/cjs/resources/receipts.js.map +1 -0
- package/dist/cjs/resources/setup-intents.d.ts +46 -0
- package/dist/cjs/resources/setup-intents.d.ts.map +1 -0
- package/dist/cjs/resources/setup-intents.js +62 -0
- package/dist/cjs/resources/setup-intents.js.map +1 -0
- package/dist/cjs/resources/transactions.d.ts +7 -0
- package/dist/cjs/resources/transactions.d.ts.map +1 -1
- package/dist/cjs/resources/transactions.js +1 -0
- package/dist/cjs/resources/transactions.js.map +1 -1
- package/dist/cjs/types.d.ts +317 -0
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/esm/errors.d.ts +36 -0
- package/dist/esm/errors.d.ts.map +1 -1
- package/dist/esm/errors.js +47 -18
- package/dist/esm/errors.js.map +1 -1
- package/dist/esm/index.d.ts +34 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +34 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/resources/checkout-sessions.d.ts +85 -0
- package/dist/esm/resources/checkout-sessions.d.ts.map +1 -0
- package/dist/esm/resources/checkout-sessions.js +65 -0
- package/dist/esm/resources/checkout-sessions.js.map +1 -0
- package/dist/esm/resources/customers.d.ts +80 -0
- package/dist/esm/resources/customers.d.ts.map +1 -0
- package/dist/esm/resources/customers.js +73 -0
- package/dist/esm/resources/customers.js.map +1 -0
- package/dist/esm/resources/payment-intents.d.ts +27 -0
- package/dist/esm/resources/payment-intents.d.ts.map +1 -1
- package/dist/esm/resources/payment-intents.js.map +1 -1
- package/dist/esm/resources/payment-links.d.ts +26 -1
- package/dist/esm/resources/payment-links.d.ts.map +1 -1
- package/dist/esm/resources/payment-links.js.map +1 -1
- package/dist/esm/resources/payment-methods.d.ts +76 -0
- package/dist/esm/resources/payment-methods.d.ts.map +1 -0
- package/dist/esm/resources/payment-methods.js +73 -0
- package/dist/esm/resources/payment-methods.js.map +1 -0
- package/dist/esm/resources/prices.d.ts +73 -0
- package/dist/esm/resources/prices.d.ts.map +1 -0
- package/dist/esm/resources/prices.js +74 -0
- package/dist/esm/resources/prices.js.map +1 -0
- package/dist/esm/resources/products.d.ts +56 -0
- package/dist/esm/resources/products.d.ts.map +1 -0
- package/dist/esm/resources/products.js +66 -0
- package/dist/esm/resources/products.js.map +1 -0
- package/dist/esm/resources/receipts.d.ts +40 -0
- package/dist/esm/resources/receipts.d.ts.map +1 -0
- package/dist/esm/resources/receipts.js +45 -0
- package/dist/esm/resources/receipts.js.map +1 -0
- package/dist/esm/resources/setup-intents.d.ts +46 -0
- package/dist/esm/resources/setup-intents.d.ts.map +1 -0
- package/dist/esm/resources/setup-intents.js +58 -0
- package/dist/esm/resources/setup-intents.js.map +1 -0
- package/dist/esm/resources/transactions.d.ts +7 -0
- package/dist/esm/resources/transactions.d.ts.map +1 -1
- package/dist/esm/resources/transactions.js +1 -0
- package/dist/esm/resources/transactions.js.map +1 -1
- package/dist/esm/types.d.ts +317 -0
- package/dist/esm/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Customers = void 0;
|
|
4
|
+
const client_js_1 = require("../client.js");
|
|
5
|
+
const liste_js_1 = require("../liste.js");
|
|
6
|
+
/**
|
|
7
|
+
* Le carnet d'adresses du marchand.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const client = await tupay.customers.create({
|
|
11
|
+
* email: 'teiva@exemple.pf',
|
|
12
|
+
* name: 'Teiva Tehei',
|
|
13
|
+
* })
|
|
14
|
+
*/
|
|
15
|
+
class Customers {
|
|
16
|
+
client;
|
|
17
|
+
constructor(client) {
|
|
18
|
+
this.client = client;
|
|
19
|
+
}
|
|
20
|
+
async create(params = {}) {
|
|
21
|
+
const { idempotencyKey, ...body } = params;
|
|
22
|
+
const { data } = await this.client.request({
|
|
23
|
+
method: 'POST',
|
|
24
|
+
path: '/customers',
|
|
25
|
+
body,
|
|
26
|
+
idempotencyKey: idempotencyKey ?? client_js_1.TupayClient.idempotencyKey(),
|
|
27
|
+
});
|
|
28
|
+
return data;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Rend aussi les clients supprimés, qui portent alors `deleted: true`.
|
|
32
|
+
* Vos paiements passés les désignent : une fiche introuvable rendrait
|
|
33
|
+
* votre historique illisible.
|
|
34
|
+
*/
|
|
35
|
+
async retrieve(id) {
|
|
36
|
+
const { data } = await this.client.request({
|
|
37
|
+
method: 'GET',
|
|
38
|
+
path: `/customers/${encodeURIComponent(id)}`,
|
|
39
|
+
});
|
|
40
|
+
return data;
|
|
41
|
+
}
|
|
42
|
+
/** Les clients supprimés ne figurent pas dans la liste. */
|
|
43
|
+
async list(params = {}) {
|
|
44
|
+
return (0, liste_js_1.normaliserListe)(await this.client.request({
|
|
45
|
+
method: 'GET',
|
|
46
|
+
path: '/customers',
|
|
47
|
+
query: { ...(0, liste_js_1.parametresListe)(params), email: params.email },
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
async update(id, params) {
|
|
51
|
+
const { data } = await this.client.request({
|
|
52
|
+
method: 'PATCH',
|
|
53
|
+
path: `/customers/${encodeURIComponent(id)}`,
|
|
54
|
+
body: params,
|
|
55
|
+
});
|
|
56
|
+
return data;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Marque la fiche supprimée **sans rien effacer**. Elle quitte la
|
|
60
|
+
* liste et refuse toute modification, mais reste lisible.
|
|
61
|
+
*
|
|
62
|
+
* `del` et non `delete` : `delete` est un mot réservé de JavaScript.
|
|
63
|
+
* Même contrainte que `webhookEndpoints.del`.
|
|
64
|
+
*
|
|
65
|
+
* Rejouable : un second appel rend le même objet, avec la même date de
|
|
66
|
+
* suppression.
|
|
67
|
+
*/
|
|
68
|
+
async del(id) {
|
|
69
|
+
const { data } = await this.client.request({
|
|
70
|
+
method: 'DELETE',
|
|
71
|
+
path: `/customers/${encodeURIComponent(id)}`,
|
|
72
|
+
});
|
|
73
|
+
return data;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.Customers = Customers;
|
|
77
|
+
//# sourceMappingURL=customers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customers.js","sourceRoot":"","sources":["../../../src/resources/customers.ts"],"names":[],"mappings":";;;AAAA,4CAA0C;AAE1C,0CAKoB;AA+CpB;;;;;;;;GAQG;AACH,MAAa,SAAS;IACS;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD,KAAK,CAAC,MAAM,CAAC,SAA+B,EAAE;QAC5C,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAA;QAC1C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAqB;YAC7D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,YAAY;YAClB,IAAI;YACJ,cAAc,EAAE,cAAc,IAAI,uBAAW,CAAC,cAAc,EAAE;SAC/D,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CAAC,EAAU;QACvB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAqB;YAC7D,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,cAAc,kBAAkB,CAAC,EAAE,CAAC,EAAE;SAC7C,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,2DAA2D;IAC3D,KAAK,CAAC,IAAI,CAAC,SAA8B,EAAE;QACzC,OAAO,IAAA,0BAAe,EACpB,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAuB;YAC9C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,EAAE,GAAG,IAAA,0BAAe,EAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE;SAC3D,CAAC,CACH,CAAA;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,MAA4B;QACnD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAqB;YAC7D,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,cAAc,kBAAkB,CAAC,EAAE,CAAC,EAAE;YAC5C,IAAI,EAAE,MAAM;SACb,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAqB;YAC7D,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,cAAc,kBAAkB,CAAC,EAAE,CAAC,EAAE;SAC7C,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAhED,8BAgEC"}
|
|
@@ -12,6 +12,33 @@ export interface CreatePaymentIntentParams {
|
|
|
12
12
|
*/
|
|
13
13
|
merchantId?: string;
|
|
14
14
|
paymentLinkId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Client à rattacher — `<uuid>` ou `cus_<uuid>`.
|
|
17
|
+
*
|
|
18
|
+
* Un identifiant inconnu, ou d'un autre marchand, lève une
|
|
19
|
+
* `TupayNotFoundError` **avant tout appel au prestataire** : aucune
|
|
20
|
+
* intention n'est ouverte chez lui, rien n'est à annuler.
|
|
21
|
+
*/
|
|
22
|
+
customer?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Carte enregistrée à débiter — `<uuid>` ou `pm_<uuid>`.
|
|
25
|
+
*
|
|
26
|
+
* **Exige `customer`** : sans lui, rien ne permet de vérifier que la
|
|
27
|
+
* carte appartient bien à ce client.
|
|
28
|
+
*
|
|
29
|
+
* Le débit est tenté dans CE MÊME appel : la promesse rend un
|
|
30
|
+
* `PaymentIntent` de statut `succeeded`, ou lève une
|
|
31
|
+
* `TupayPaymentDeclinedError` si la banque refuse.
|
|
32
|
+
*/
|
|
33
|
+
paymentMethod?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Le porteur n'est pas devant son écran (abonnement, relance).
|
|
36
|
+
*
|
|
37
|
+
* ⚠️ Hors session, une authentification forte ne peut pas aboutir :
|
|
38
|
+
* la banque rend alors `failureCode: 'authentication_required'`.
|
|
39
|
+
* **Ce n'est pas un refus** — ramenez le porteur devant son écran.
|
|
40
|
+
*/
|
|
41
|
+
offSession?: boolean;
|
|
15
42
|
metadata?: Record<string, string>;
|
|
16
43
|
/**
|
|
17
44
|
* Clé d'idempotence. Omise, le SDK en génère une (UUID v4) : la requête
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-intents.d.ts","sourceRoot":"","sources":["../../../src/resources/payment-intents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,WAAW,yBAAyB;IACxC,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAE1C,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC;CAUxE"}
|
|
1
|
+
{"version":3,"file":"payment-intents.d.ts","sourceRoot":"","sources":["../../../src/resources/payment-intents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,WAAW,yBAAyB;IACxC,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAE1C,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC;CAUxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-intents.js","sourceRoot":"","sources":["../../../src/resources/payment-intents.ts"],"names":[],"mappings":";;;AAAA,4CAA0C;
|
|
1
|
+
{"version":3,"file":"payment-intents.js","sourceRoot":"","sources":["../../../src/resources/payment-intents.ts"],"names":[],"mappings":";;;AAAA,4CAA0C;AAoD1C,MAAa,cAAc;IACI;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD,KAAK,CAAC,MAAM,CAAC,MAAiC;QAC5C,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAA;QAC1C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAA0B;YAClE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,kBAAkB;YACxB,IAAI;YACJ,cAAc,EAAE,cAAc,IAAI,uBAAW,CAAC,cAAc,EAAE;SAC/D,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAbD,wCAaC"}
|
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
import { TupayClient } from '../client.js';
|
|
2
2
|
import type { ListResult, PaymentLink } from '../types.js';
|
|
3
3
|
import { type ListParams } from '../liste.js';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Un lien porte **soit** un tarif, **soit** un montant libre.
|
|
6
|
+
*
|
|
7
|
+
* Les deux formes sont distinctes au niveau du TYPE : passer les deux, ou
|
|
8
|
+
* aucun, ne compile pas. L'API le refuse aussi — mais un SDK qui laisse
|
|
9
|
+
* écrire la requête fautive fait découvrir l'erreur à l'exécution.
|
|
10
|
+
*/
|
|
11
|
+
export type CreatePaymentLinkParams = CreatePaymentLinkAvecTarif | CreatePaymentLinkMontantLibre;
|
|
12
|
+
interface CreatePaymentLinkCommun {
|
|
5
13
|
/**
|
|
6
14
|
* Clé d'idempotence. Omise, le SDK en génère une (UUID v4) : la
|
|
7
15
|
* requête devient rejouable, et une reprise ne crée pas un second lien.
|
|
8
16
|
*/
|
|
9
17
|
idempotencyKey?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface CreatePaymentLinkAvecTarif extends CreatePaymentLinkCommun {
|
|
20
|
+
/**
|
|
21
|
+
* Tarif dont le lien hérite montant et libellé.
|
|
22
|
+
*
|
|
23
|
+
* Le libellé vient du `nickname` du tarif, ou à défaut du nom de
|
|
24
|
+
* l'article. Un tarif désactivé lève une `TupayConflictError` : il ne
|
|
25
|
+
* sert plus à créer de nouveaux liens, mais ceux qui le référencent
|
|
26
|
+
* déjà continuent de fonctionner.
|
|
27
|
+
*/
|
|
28
|
+
price: string;
|
|
29
|
+
amountXpf?: never;
|
|
30
|
+
description?: never;
|
|
31
|
+
}
|
|
32
|
+
export interface CreatePaymentLinkMontantLibre extends CreatePaymentLinkCommun {
|
|
33
|
+
price?: never;
|
|
10
34
|
/** Entier XPF, entre 100 et 10 000 000. Le XPF n'a pas de centimes. */
|
|
11
35
|
amountXpf: number;
|
|
12
36
|
description: string;
|
|
@@ -45,4 +69,5 @@ export declare class PaymentLinks {
|
|
|
45
69
|
deactivate(id: string): Promise<PaymentLink>;
|
|
46
70
|
activate(id: string): Promise<PaymentLink>;
|
|
47
71
|
}
|
|
72
|
+
export {};
|
|
48
73
|
//# sourceMappingURL=payment-links.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-links.d.ts","sourceRoot":"","sources":["../../../src/resources/payment-links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,aAAa,CAAA;AAEpB,MAAM,
|
|
1
|
+
{"version":3,"file":"payment-links.d.ts","sourceRoot":"","sources":["../../../src/resources/payment-links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,aAAa,CAAA;AAEpB;;;;;;GAMG;AACH,MAAM,MAAM,uBAAuB,GAC/B,0BAA0B,GAC1B,6BAA6B,CAAA;AAEjC,UAAU,uBAAuB;IAC/B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,0BAA2B,SAAQ,uBAAuB;IACzE;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,WAAW,CAAC,EAAE,KAAK,CAAA;CACpB;AAED,MAAM,WAAW,6BAA8B,SAAQ,uBAAuB;IAC5E,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAClC;AAED,qBAAa,YAAY;;IACX,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEhD;;;;;;;;;;;OAWG;IACG,MAAM,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,WAAW,CAAC;IAW7D,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAQ1C,IAAI,CAAC,MAAM,GAAE,UAAe,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAUrE,yEAAyE;IACnE,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAI5C,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAYjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-links.js","sourceRoot":"","sources":["../../../src/resources/payment-links.ts"],"names":[],"mappings":";;;AAAA,4CAA0C;AAE1C,0CAKoB;
|
|
1
|
+
{"version":3,"file":"payment-links.js","sourceRoot":"","sources":["../../../src/resources/payment-links.ts"],"names":[],"mappings":";;;AAAA,4CAA0C;AAE1C,0CAKoB;AAqDpB,MAAa,YAAY;IACM;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,CAAC,MAA+B;QAC1C,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,M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AE,MAAM,EAAE;SACjB,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AA7DD,oCA6DC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { TupayClient } from '../client.js';
|
|
2
|
+
import type { ListResult, PaymentMethod } from '../types.js';
|
|
3
|
+
import { type ListParams } from '../liste.js';
|
|
4
|
+
export interface CreatePaymentMethodParams {
|
|
5
|
+
/** Client auquel rattacher le moyen — `<uuid>` ou `cus_<uuid>`. */
|
|
6
|
+
customer: string;
|
|
7
|
+
/**
|
|
8
|
+
* Jeton du prestataire, obtenu dans le navigateur du porteur.
|
|
9
|
+
*
|
|
10
|
+
* ⚠️ **Jamais un numéro de carte.** Tupay n'en accepte aucun : la
|
|
11
|
+
* carte est tokenisée chez le prestataire, sur son domaine, et le
|
|
12
|
+
* numéro ne touche ni vos serveurs ni les nôtres. C'est ce qui
|
|
13
|
+
* maintient votre intégration dans le périmètre PCI-DSS SAQ A.
|
|
14
|
+
*
|
|
15
|
+
* En mode test : `pm_card_visa`, `pm_card_mastercard`, `pm_card_amex`,
|
|
16
|
+
* `pm_card_expired`.
|
|
17
|
+
*/
|
|
18
|
+
token: string;
|
|
19
|
+
/**
|
|
20
|
+
* Désigne ce moyen comme celui à utiliser par défaut.
|
|
21
|
+
*
|
|
22
|
+
* Inutile pour le PREMIER moyen d'un client : il le devient seul.
|
|
23
|
+
*/
|
|
24
|
+
default?: boolean;
|
|
25
|
+
metadata?: Record<string, string>;
|
|
26
|
+
/** Omise, le SDK en génère une (UUID v4) : la requête devient rejouable. */
|
|
27
|
+
idempotencyKey?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface UpdatePaymentMethodParams {
|
|
30
|
+
/**
|
|
31
|
+
* Seul `true` est accepté.
|
|
32
|
+
*
|
|
33
|
+
* Retirer le défaut sans en désigner un autre laisserait le client
|
|
34
|
+
* sans moyen par défaut, et le prochain paiement qui n'en précise pas
|
|
35
|
+
* échouerait. Pour retirer un moyen, détachez-le avec `del()`.
|
|
36
|
+
*/
|
|
37
|
+
default?: true;
|
|
38
|
+
metadata?: Record<string, string | null> | null;
|
|
39
|
+
}
|
|
40
|
+
export interface ListPaymentMethodsParams extends ListParams {
|
|
41
|
+
/** N'obtenir que les moyens de ce client — `<uuid>` ou `cus_<uuid>`. */
|
|
42
|
+
customer?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Les cartes enregistrées de vos clients.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* // Le jeton vient de Stripe.js, dans le navigateur du porteur.
|
|
49
|
+
* const moyen = await tupay.paymentMethods.create({
|
|
50
|
+
* customer: client.id,
|
|
51
|
+
* token: jetonDuNavigateur,
|
|
52
|
+
* })
|
|
53
|
+
* moyen.last4 // '4242'
|
|
54
|
+
* moyen.default // true — c'était le premier
|
|
55
|
+
*/
|
|
56
|
+
export declare class PaymentMethods {
|
|
57
|
+
private readonly client;
|
|
58
|
+
constructor(client: TupayClient);
|
|
59
|
+
create(params: CreatePaymentMethodParams): Promise<PaymentMethod>;
|
|
60
|
+
/** Rend aussi les moyens détachés, qui portent `detached: true`. */
|
|
61
|
+
retrieve(id: string): Promise<PaymentMethod>;
|
|
62
|
+
/** Les moyens détachés ne figurent pas dans la liste. */
|
|
63
|
+
list(params?: ListPaymentMethodsParams): Promise<ListResult<PaymentMethod>>;
|
|
64
|
+
update(id: string, params: UpdatePaymentMethodParams): Promise<PaymentMethod>;
|
|
65
|
+
/** Raccourci lisible pour `update(id, { default: true })`. */
|
|
66
|
+
setDefault(id: string): Promise<PaymentMethod>;
|
|
67
|
+
/**
|
|
68
|
+
* Détache le moyen : il cesse d'être utilisable, **sans que rien ne
|
|
69
|
+
* soit effacé**. Il quitte la liste et reste lisible — les paiements
|
|
70
|
+
* qu'il a servis le désignent.
|
|
71
|
+
*
|
|
72
|
+
* `del` et non `delete` : mot réservé de JavaScript.
|
|
73
|
+
*/
|
|
74
|
+
del(id: string): Promise<PaymentMethod>;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=payment-methods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-methods.d.ts","sourceRoot":"","sources":["../../../src/resources/payment-methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,aAAa,CAAA;AAEpB,MAAM,WAAW,yBAAyB;IACxC,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAA;IAChB;;;;;;;;;;OAUG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,yBAAyB;IACxC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,IAAI,CAAA;CAChD;AAED,MAAM,WAAW,wBAAyB,SAAQ,UAAU;IAC1D,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAE1C,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC;IAWvE,oEAAoE;IAC9D,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAQlD,yDAAyD;IACnD,IAAI,CAAC,MAAM,GAAE,wBAA6B,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAU/E,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC;IASnF,8DAA8D;IACxD,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAIpD;;;;;;OAMG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAO9C"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaymentMethods = void 0;
|
|
4
|
+
const client_js_1 = require("../client.js");
|
|
5
|
+
const liste_js_1 = require("../liste.js");
|
|
6
|
+
/**
|
|
7
|
+
* Les cartes enregistrées de vos clients.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // Le jeton vient de Stripe.js, dans le navigateur du porteur.
|
|
11
|
+
* const moyen = await tupay.paymentMethods.create({
|
|
12
|
+
* customer: client.id,
|
|
13
|
+
* token: jetonDuNavigateur,
|
|
14
|
+
* })
|
|
15
|
+
* moyen.last4 // '4242'
|
|
16
|
+
* moyen.default // true — c'était le premier
|
|
17
|
+
*/
|
|
18
|
+
class PaymentMethods {
|
|
19
|
+
client;
|
|
20
|
+
constructor(client) {
|
|
21
|
+
this.client = client;
|
|
22
|
+
}
|
|
23
|
+
async create(params) {
|
|
24
|
+
const { idempotencyKey, ...body } = params;
|
|
25
|
+
const { data } = await this.client.request({
|
|
26
|
+
method: 'POST',
|
|
27
|
+
path: '/payment-methods',
|
|
28
|
+
body,
|
|
29
|
+
idempotencyKey: idempotencyKey ?? client_js_1.TupayClient.idempotencyKey(),
|
|
30
|
+
});
|
|
31
|
+
return data;
|
|
32
|
+
}
|
|
33
|
+
/** Rend aussi les moyens détachés, qui portent `detached: true`. */
|
|
34
|
+
async retrieve(id) {
|
|
35
|
+
const { data } = await this.client.request({
|
|
36
|
+
method: 'GET',
|
|
37
|
+
path: `/payment-methods/${encodeURIComponent(id)}`,
|
|
38
|
+
});
|
|
39
|
+
return data;
|
|
40
|
+
}
|
|
41
|
+
/** Les moyens détachés ne figurent pas dans la liste. */
|
|
42
|
+
async list(params = {}) {
|
|
43
|
+
return (0, liste_js_1.normaliserListe)(await this.client.request({
|
|
44
|
+
method: 'GET',
|
|
45
|
+
path: '/payment-methods',
|
|
46
|
+
query: { ...(0, liste_js_1.parametresListe)(params), customer: params.customer },
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
async update(id, params) {
|
|
50
|
+
const { data } = await this.client.request({
|
|
51
|
+
method: 'PATCH',
|
|
52
|
+
path: `/payment-methods/${encodeURIComponent(id)}`,
|
|
53
|
+
body: params,
|
|
54
|
+
});
|
|
55
|
+
return data;
|
|
56
|
+
}
|
|
57
|
+
/** Raccourci lisible pour `update(id, { default: true })`. */
|
|
58
|
+
async setDefault(id) {
|
|
59
|
+
return this.update(id, { default: true });
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Détache le moyen : il cesse d'être utilisable, **sans que rien ne
|
|
63
|
+
* soit effacé**. Il quitte la liste et reste lisible — les paiements
|
|
64
|
+
* qu'il a servis le désignent.
|
|
65
|
+
*
|
|
66
|
+
* `del` et non `delete` : mot réservé de JavaScript.
|
|
67
|
+
*/
|
|
68
|
+
async del(id) {
|
|
69
|
+
const { data } = await this.client.request({
|
|
70
|
+
method: 'DELETE',
|
|
71
|
+
path: `/payment-methods/${encodeURIComponent(id)}`,
|
|
72
|
+
});
|
|
73
|
+
return data;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.PaymentMethods = PaymentMethods;
|
|
77
|
+
//# sourceMappingURL=payment-methods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-methods.js","sourceRoot":"","sources":["../../../src/resources/payment-methods.ts"],"names":[],"mappings":";;;AAA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YACf,IAAI,EAAE,oBAAoB,kBAAkB,CAAC,EAAE,CAAC,EAAE;YAClD,IAAI,EAAE,MAAM;SACb,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,8DAA8D;IAC9D,KAAK,CAAC,UAAU,CAAC,EAAU;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAA;IAC3C,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAA0B;YAClE,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,oBAAoB,kBAAkB,CAAC,EAAE,CAAC,EAAE;SACnD,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AA9DD,wCA8DC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { TupayClient } from '../client.js';
|
|
2
|
+
import type { ListResult, Price, RecurringInterval } from '../types.js';
|
|
3
|
+
import { type ListParams } from '../liste.js';
|
|
4
|
+
export interface CreatePriceParams {
|
|
5
|
+
/** Article auquel attacher ce prix — `<uuid>` ou `prod_<uuid>`. */
|
|
6
|
+
product: string;
|
|
7
|
+
/**
|
|
8
|
+
* Entier de francs pacifiques.
|
|
9
|
+
*
|
|
10
|
+
* ⚠️ **Le XPF n'a pas de centimes.** 6 000 XPF s'écrit `6000`, jamais
|
|
11
|
+
* `6000.50` ni `600000` — si vous venez de Stripe, ce n'est pas la
|
|
12
|
+
* plus petite unité, c'est le franc.
|
|
13
|
+
*/
|
|
14
|
+
amountXpf: number;
|
|
15
|
+
/** Absent = tarif ponctuel. */
|
|
16
|
+
recurring?: {
|
|
17
|
+
interval: RecurringInterval;
|
|
18
|
+
/** « tous les 3 mois » = `month` + `3`. Défaut 1. */
|
|
19
|
+
intervalCount?: number;
|
|
20
|
+
};
|
|
21
|
+
nickname?: string;
|
|
22
|
+
metadata?: Record<string, string>;
|
|
23
|
+
/** Omise, le SDK en génère une (UUID v4) : la requête devient rejouable. */
|
|
24
|
+
idempotencyKey?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* ⚠️ Ni `amountXpf`, ni `recurring`, ni `product` — **un tarif est
|
|
28
|
+
* immuable**. Pour changer un prix : créez-en un nouveau, puis
|
|
29
|
+
* désactivez l'ancien. Vos liens existants continueront de fonctionner.
|
|
30
|
+
*/
|
|
31
|
+
export interface UpdatePriceParams {
|
|
32
|
+
nickname?: string | null;
|
|
33
|
+
active?: boolean;
|
|
34
|
+
metadata?: Record<string, string | null> | null;
|
|
35
|
+
}
|
|
36
|
+
export interface ListPricesParams extends ListParams {
|
|
37
|
+
/** N'obtenir que les tarifs de cet article. */
|
|
38
|
+
product?: string;
|
|
39
|
+
active?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Les prix de votre catalogue.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* const unitaire = await tupay.prices.create({
|
|
46
|
+
* product: article.id,
|
|
47
|
+
* amountXpf: 6000,
|
|
48
|
+
* })
|
|
49
|
+
* const abonnement = await tupay.prices.create({
|
|
50
|
+
* product: article.id,
|
|
51
|
+
* amountXpf: 45000,
|
|
52
|
+
* recurring: { interval: 'month' },
|
|
53
|
+
* })
|
|
54
|
+
*/
|
|
55
|
+
export declare class Prices {
|
|
56
|
+
private readonly client;
|
|
57
|
+
constructor(client: TupayClient);
|
|
58
|
+
create(params: CreatePriceParams): Promise<Price>;
|
|
59
|
+
/** Rend aussi les tarifs désactivés — pour savoir à combien on vendait. */
|
|
60
|
+
retrieve(id: string): Promise<Price>;
|
|
61
|
+
list(params?: ListPricesParams): Promise<ListResult<Price>>;
|
|
62
|
+
/**
|
|
63
|
+
* Modifie l'ÉTIQUETAGE seulement.
|
|
64
|
+
*
|
|
65
|
+
* Une tentative de changer le prix lève une `TupayConflictError` : le
|
|
66
|
+
* montant est immuable, y compris en base.
|
|
67
|
+
*/
|
|
68
|
+
update(id: string, params: UpdatePriceParams): Promise<Price>;
|
|
69
|
+
/** Retire le tarif des nouvelles ventes. Réversible. */
|
|
70
|
+
deactivate(id: string): Promise<Price>;
|
|
71
|
+
activate(id: string): Promise<Price>;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=prices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prices.d.ts","sourceRoot":"","sources":["../../../src/resources/prices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACvE,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,aAAa,CAAA;AAEpB,MAAM,WAAW,iBAAiB;IAChC,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAA;IACf;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB,+BAA+B;IAC/B,SAAS,CAAC,EAAE;QACV,QAAQ,EAAE,iBAAiB,CAAA;QAC3B,qDAAqD;QACrD,aAAa,CAAC,EAAE,MAAM,CAAA;KACvB,CAAA;IACD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,IAAI,CAAA;CAChD;AAED,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,MAAM;IACL,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAE1C,MAAM,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC;IAWvD,2EAA2E;IACrE,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAQpC,IAAI,CAAC,MAAM,GAAE,gBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAerE;;;;;OAKG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC;IASnE,wDAAwD;IAClD,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAItC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;CAG3C"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Prices = void 0;
|
|
4
|
+
const client_js_1 = require("../client.js");
|
|
5
|
+
const liste_js_1 = require("../liste.js");
|
|
6
|
+
/**
|
|
7
|
+
* Les prix de votre catalogue.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const unitaire = await tupay.prices.create({
|
|
11
|
+
* product: article.id,
|
|
12
|
+
* amountXpf: 6000,
|
|
13
|
+
* })
|
|
14
|
+
* const abonnement = await tupay.prices.create({
|
|
15
|
+
* product: article.id,
|
|
16
|
+
* amountXpf: 45000,
|
|
17
|
+
* recurring: { interval: 'month' },
|
|
18
|
+
* })
|
|
19
|
+
*/
|
|
20
|
+
class Prices {
|
|
21
|
+
client;
|
|
22
|
+
constructor(client) {
|
|
23
|
+
this.client = client;
|
|
24
|
+
}
|
|
25
|
+
async create(params) {
|
|
26
|
+
const { idempotencyKey, ...body } = params;
|
|
27
|
+
const { data } = await this.client.request({
|
|
28
|
+
method: 'POST',
|
|
29
|
+
path: '/prices',
|
|
30
|
+
body,
|
|
31
|
+
idempotencyKey: idempotencyKey ?? client_js_1.TupayClient.idempotencyKey(),
|
|
32
|
+
});
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
/** Rend aussi les tarifs désactivés — pour savoir à combien on vendait. */
|
|
36
|
+
async retrieve(id) {
|
|
37
|
+
const { data } = await this.client.request({
|
|
38
|
+
method: 'GET',
|
|
39
|
+
path: `/prices/${encodeURIComponent(id)}`,
|
|
40
|
+
});
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
43
|
+
async list(params = {}) {
|
|
44
|
+
return (0, liste_js_1.normaliserListe)(await this.client.request({
|
|
45
|
+
method: 'GET',
|
|
46
|
+
path: '/prices',
|
|
47
|
+
query: {
|
|
48
|
+
...(0, liste_js_1.parametresListe)(params),
|
|
49
|
+
product: params.product,
|
|
50
|
+
// `undefined` disparaît de la requête ; `false` doit survivre.
|
|
51
|
+
active: params.active === undefined ? undefined : String(params.active),
|
|
52
|
+
},
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Modifie l'ÉTIQUETAGE seulement.
|
|
57
|
+
*
|
|
58
|
+
* Une tentative de changer le prix lève une `TupayConflictError` : le
|
|
59
|
+
* montant est immuable, y compris en base.
|
|
60
|
+
*/
|
|
61
|
+
async update(id, params) {
|
|
62
|
+
const { data } = await this.client.request({
|
|
63
|
+
method: 'PATCH',
|
|
64
|
+
path: `/prices/${encodeURIComponent(id)}`,
|
|
65
|
+
body: params,
|
|
66
|
+
});
|
|
67
|
+
return data;
|
|
68
|
+
}
|
|
69
|
+
/** Retire le tarif des nouvelles ventes. Réversible. */
|
|
70
|
+
async deactivate(id) {
|
|
71
|
+
return this.update(id, { active: false });
|
|
72
|
+
}
|
|
73
|
+
async activate(id) {
|
|
74
|
+
return this.update(id, { active: true });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.Prices = Prices;
|
|
78
|
+
//# sourceMappingURL=prices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prices.js","sourceRoot":"","sources":["../../../src/resources/prices.ts"],"names":[],"mappings":";;;AAAA,4CAA0C;AAE1C,0CAKoB;AA0CpB;;;;;;;;;;;;;GAaG;AACH,MAAa,MAAM;IACY;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD,KAAK,CAAC,MAAM,CAAC,MAAyB;QACpC,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAA;QAC1C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAkB;YAC1D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,SAAS;YACf,IAAI;YACJ,cAAc,EAAE,cAAc,IAAI,uBAAW,CAAC,cAAc,EAAE;SAC/D,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,2EAA2E;IAC3E,KAAK,CAAC,QAAQ,CAAC,EAAU;QACvB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAkB;YAC1D,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,WAAW,kBAAkB,CAAC,EAAE,CAAC,EAAE;SAC1C,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,SAA2B,EAAE;QACtC,OAAO,IAAA,0BAAe,EACpB,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAoB;YAC3C,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,SAAS;YACf,KAAK,EAAE;gBACL,GAAG,IAAA,0BAAe,EAAC,MAAM,CAAC;gBAC1B,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,+DAA+D;gBAC/D,MAAM,EAAE,MAAM,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;aACxE;SACF,CAAC,CACH,CAAA;IACH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,MAAyB;QAChD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAkB;YAC1D,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,WAAW,kBAAkB,CAAC,EAAE,CAAC,EAAE;YACzC,IAAI,EAAE,MAAM;SACb,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,wDAAwD;IACxD,KAAK,CAAC,UAAU,CAAC,EAAU;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAA;IAC3C,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAAU;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAA;IAC1C,CAAC;CACF;AA7DD,wBA6DC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { TupayClient } from '../client.js';
|
|
2
|
+
import type { ListResult, Product } from '../types.js';
|
|
3
|
+
import { type ListParams } from '../liste.js';
|
|
4
|
+
export interface CreateProductParams {
|
|
5
|
+
/** Le seul champ requis. Deux articles peuvent porter le même nom. */
|
|
6
|
+
name: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
metadata?: Record<string, string>;
|
|
9
|
+
/** Omise, le SDK en génère une (UUID v4) : la requête devient rejouable. */
|
|
10
|
+
idempotencyKey?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* `null` EFFACE la description ; l'omettre la laisse inchangée.
|
|
14
|
+
*
|
|
15
|
+
* `name` n'est pas effaçable — un article sans nom n'existe pas.
|
|
16
|
+
*/
|
|
17
|
+
export interface UpdateProductParams {
|
|
18
|
+
name?: string;
|
|
19
|
+
description?: string | null;
|
|
20
|
+
/**
|
|
21
|
+
* `false` retire l'article des nouvelles ventes **sans rien détruire** :
|
|
22
|
+
* ses tarifs existants continuent de fonctionner. Réversible.
|
|
23
|
+
*/
|
|
24
|
+
active?: boolean;
|
|
25
|
+
metadata?: Record<string, string | null> | null;
|
|
26
|
+
}
|
|
27
|
+
export interface ListProductsParams extends ListParams {
|
|
28
|
+
/** Omis, la liste montre TOUT — actifs et inactifs. */
|
|
29
|
+
active?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Le catalogue : ce que vous vendez.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* const article = await tupay.products.create({ name: 'Sortie lagon' })
|
|
36
|
+
* // Plus tard, hors saison :
|
|
37
|
+
* await tupay.products.deactivate(article.id)
|
|
38
|
+
*/
|
|
39
|
+
export declare class Products {
|
|
40
|
+
private readonly client;
|
|
41
|
+
constructor(client: TupayClient);
|
|
42
|
+
create(params: CreateProductParams): Promise<Product>;
|
|
43
|
+
/** Rend aussi les articles désactivés — le seul moyen de les réactiver. */
|
|
44
|
+
retrieve(id: string): Promise<Product>;
|
|
45
|
+
list(params?: ListProductsParams): Promise<ListResult<Product>>;
|
|
46
|
+
update(id: string, params: UpdateProductParams): Promise<Product>;
|
|
47
|
+
/**
|
|
48
|
+
* Retire l'article des nouvelles ventes.
|
|
49
|
+
*
|
|
50
|
+
* Il n'y a pas de `del()` : un article se désactive, il ne se supprime
|
|
51
|
+
* pas. `activate()` défait exactement ceci.
|
|
52
|
+
*/
|
|
53
|
+
deactivate(id: string): Promise<Product>;
|
|
54
|
+
activate(id: string): Promise<Product>;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=products.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../src/resources/products.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,aAAa,CAAA;AAEpB,MAAM,WAAW,mBAAmB;IAClC,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,IAAI,CAAA;CAChD;AAED,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD,uDAAuD;IACvD,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;GAOG;AACH,qBAAa,QAAQ;IACP,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAE1C,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAW3D,2EAA2E;IACrE,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQtC,IAAI,CAAC,MAAM,GAAE,kBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAcnE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IASvE;;;;;OAKG;IACG,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIxC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAG7C"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Products = void 0;
|
|
4
|
+
const client_js_1 = require("../client.js");
|
|
5
|
+
const liste_js_1 = require("../liste.js");
|
|
6
|
+
/**
|
|
7
|
+
* Le catalogue : ce que vous vendez.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const article = await tupay.products.create({ name: 'Sortie lagon' })
|
|
11
|
+
* // Plus tard, hors saison :
|
|
12
|
+
* await tupay.products.deactivate(article.id)
|
|
13
|
+
*/
|
|
14
|
+
class Products {
|
|
15
|
+
client;
|
|
16
|
+
constructor(client) {
|
|
17
|
+
this.client = client;
|
|
18
|
+
}
|
|
19
|
+
async create(params) {
|
|
20
|
+
const { idempotencyKey, ...body } = params;
|
|
21
|
+
const { data } = await this.client.request({
|
|
22
|
+
method: 'POST',
|
|
23
|
+
path: '/products',
|
|
24
|
+
body,
|
|
25
|
+
idempotencyKey: idempotencyKey ?? client_js_1.TupayClient.idempotencyKey(),
|
|
26
|
+
});
|
|
27
|
+
return data;
|
|
28
|
+
}
|
|
29
|
+
/** Rend aussi les articles désactivés — le seul moyen de les réactiver. */
|
|
30
|
+
async retrieve(id) {
|
|
31
|
+
const { data } = await this.client.request({
|
|
32
|
+
method: 'GET',
|
|
33
|
+
path: `/products/${encodeURIComponent(id)}`,
|
|
34
|
+
});
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
async list(params = {}) {
|
|
38
|
+
return (0, liste_js_1.normaliserListe)(await this.client.request({
|
|
39
|
+
method: 'GET',
|
|
40
|
+
path: '/products',
|
|
41
|
+
query: {
|
|
42
|
+
...(0, liste_js_1.parametresListe)(params),
|
|
43
|
+
// `undefined` disparaît de la requête ; `false` doit survivre.
|
|
44
|
+
active: params.active === undefined ? undefined : String(params.active),
|
|
45
|
+
},
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
async update(id, params) {
|
|
49
|
+
const { data } = await this.client.request({
|
|
50
|
+
method: 'PATCH',
|
|
51
|
+
path: `/products/${encodeURIComponent(id)}`,
|
|
52
|
+
body: params,
|
|
53
|
+
});
|
|
54
|
+
return data;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Retire l'article des nouvelles ventes.
|
|
58
|
+
*
|
|
59
|
+
* Il n'y a pas de `del()` : un article se désactive, il ne se supprime
|
|
60
|
+
* pas. `activate()` défait exactement ceci.
|
|
61
|
+
*/
|
|
62
|
+
async deactivate(id) {
|
|
63
|
+
return this.update(id, { active: false });
|
|
64
|
+
}
|
|
65
|
+
async activate(id) {
|
|
66
|
+
return this.update(id, { active: true });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.Products = Products;
|
|
70
|
+
//# sourceMappingURL=products.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../../src/resources/products.ts"],"names":[],"mappings":";;;AAAA,4CAA0C;AAE1C,0CAKoB;AAgCpB;;;;;;;GAOG;AACH,MAAa,QAAQ;IACU;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD,KAAK,CAAC,MAAM,CAAC,MAA2B;QACtC,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAA;QAC1C,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAoB;YAC5D,MAAM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