@archildata/api-types 0.0.47 → 0.0.49

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 (2) hide show
  1. package/index.d.ts +238 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -41,6 +41,29 @@ export interface paths {
41
41
  patch?: never;
42
42
  trace?: never;
43
43
  };
44
+ "/api/billing/payment-methods/{paymentMethodID}": {
45
+ parameters: {
46
+ query?: never;
47
+ header?: never;
48
+ path: {
49
+ paymentMethodID: string;
50
+ };
51
+ cookie?: never;
52
+ };
53
+ get?: never;
54
+ put?: never;
55
+ post?: never;
56
+ /**
57
+ * Delete a saved payment method
58
+ * @description Deletes the saved payment method from the Archil account. To use the same card again, add it as a new payment method.
59
+ */
60
+ delete: operations["deleteBillingPaymentMethod"];
61
+ options?: never;
62
+ head?: never;
63
+ /** Edit a saved card's billing name or address */
64
+ patch: operations["updateBillingPaymentMethod"];
65
+ trace?: never;
66
+ };
44
67
  "/api/billing/setup-intents": {
45
68
  parameters: {
46
69
  query?: never;
@@ -50,7 +73,10 @@ export interface paths {
50
73
  };
51
74
  get?: never;
52
75
  put?: never;
53
- /** Start card setup with Stripe Elements */
76
+ /**
77
+ * Start card setup with Stripe Elements
78
+ * @description Confirm the returned SetupIntent with Stripe Elements in the client.
79
+ */
54
80
  post: operations["createBillingSetupIntent"];
55
81
  delete?: never;
56
82
  options?: never;
@@ -78,6 +104,24 @@ export interface paths {
78
104
  patch?: never;
79
105
  trace?: never;
80
106
  };
107
+ "/api/billing/profile": {
108
+ parameters: {
109
+ query?: never;
110
+ header?: never;
111
+ path?: never;
112
+ cookie?: never;
113
+ };
114
+ /** Get invoice billing details from Stripe */
115
+ get: operations["getBillingProfile"];
116
+ put?: never;
117
+ post?: never;
118
+ delete?: never;
119
+ options?: never;
120
+ head?: never;
121
+ /** Update invoice billing details in Stripe */
122
+ patch: operations["updateBillingProfile"];
123
+ trace?: never;
124
+ };
81
125
  "/api/activity": {
82
126
  parameters: {
83
127
  query?: never;
@@ -915,10 +959,41 @@ export interface components {
915
959
  /** Format: int64 */
916
960
  expYear: number;
917
961
  };
962
+ billingDetails?: {
963
+ name: string;
964
+ address?: components["schemas"]["BillingAddress"];
965
+ };
918
966
  isCustomerDefault: boolean;
919
967
  isSubscriptionDefault: boolean;
920
968
  isDefault: boolean;
921
969
  };
970
+ BillingAddress: {
971
+ line1: string;
972
+ line2: string;
973
+ city: string;
974
+ state: string;
975
+ postalCode: string;
976
+ country: string;
977
+ };
978
+ BillingAddressPatch: {
979
+ line1?: string;
980
+ line2?: string;
981
+ city?: string;
982
+ state?: string;
983
+ postalCode?: string;
984
+ country?: string;
985
+ };
986
+ ApiResponse_BillingPaymentMethod: {
987
+ success: boolean;
988
+ data: components["schemas"]["BillingPaymentMethod"];
989
+ };
990
+ ApiResponse_BillingMethodRemoved: {
991
+ success: boolean;
992
+ data: {
993
+ id: string;
994
+ removed: boolean;
995
+ };
996
+ };
922
997
  ApiResponse_BillingPaymentMethods: {
923
998
  success: boolean;
924
999
  data: components["schemas"]["BillingPaymentMethod"][];
@@ -941,6 +1016,28 @@ export interface components {
941
1016
  scope: "customer" | "customer_and_subscription";
942
1017
  };
943
1018
  };
1019
+ BillingProfile: {
1020
+ /** @enum {string} */
1021
+ billingMode: "not_setup" | "self_serve";
1022
+ name: string;
1023
+ email: string;
1024
+ phone: string;
1025
+ address?: components["schemas"]["BillingAddress"];
1026
+ };
1027
+ BillingProfileValidationError: components["schemas"]["ErrorResponse"] & {
1028
+ /** @enum {string} */
1029
+ code: "invalid_billing_profile";
1030
+ data: {
1031
+ /** @description Validation messages keyed by profile field name. */
1032
+ fieldErrors: {
1033
+ [key: string]: string;
1034
+ };
1035
+ };
1036
+ };
1037
+ ApiResponse_BillingProfile: {
1038
+ success: boolean;
1039
+ data: components["schemas"]["BillingProfile"];
1040
+ };
944
1041
  ActivityEvent: {
945
1042
  accountId: string;
946
1043
  /**
@@ -2248,6 +2345,83 @@ export interface operations {
2248
2345
  };
2249
2346
  };
2250
2347
  };
2348
+ deleteBillingPaymentMethod: {
2349
+ parameters: {
2350
+ query?: never;
2351
+ header?: never;
2352
+ path: {
2353
+ paymentMethodID: string;
2354
+ };
2355
+ cookie?: never;
2356
+ };
2357
+ requestBody?: never;
2358
+ responses: {
2359
+ /** @description Saved payment method deleted from the Archil account */
2360
+ 200: {
2361
+ headers: {
2362
+ [name: string]: unknown;
2363
+ };
2364
+ content: {
2365
+ "application/json": components["schemas"]["ApiResponse_BillingMethodRemoved"];
2366
+ };
2367
+ };
2368
+ 400: components["responses"]["ValidationError"];
2369
+ /** @description Missing, invalid, or disallowed credential */
2370
+ 401: {
2371
+ headers: {
2372
+ [name: string]: unknown;
2373
+ };
2374
+ content: {
2375
+ "text/plain": string;
2376
+ };
2377
+ };
2378
+ 404: components["responses"]["NotFound"];
2379
+ 409: components["responses"]["ValidationError"];
2380
+ 502: components["responses"]["InternalError"];
2381
+ };
2382
+ };
2383
+ updateBillingPaymentMethod: {
2384
+ parameters: {
2385
+ query?: never;
2386
+ header?: never;
2387
+ path: {
2388
+ paymentMethodID: string;
2389
+ };
2390
+ cookie?: never;
2391
+ };
2392
+ requestBody: {
2393
+ content: {
2394
+ "application/json": {
2395
+ name?: string;
2396
+ address?: components["schemas"]["BillingAddressPatch"];
2397
+ };
2398
+ };
2399
+ };
2400
+ responses: {
2401
+ /** @description Updated safe method details */
2402
+ 200: {
2403
+ headers: {
2404
+ [name: string]: unknown;
2405
+ };
2406
+ content: {
2407
+ "application/json": components["schemas"]["ApiResponse_BillingPaymentMethod"];
2408
+ };
2409
+ };
2410
+ 400: components["responses"]["ValidationError"];
2411
+ /** @description Missing, invalid, or disallowed credential */
2412
+ 401: {
2413
+ headers: {
2414
+ [name: string]: unknown;
2415
+ };
2416
+ content: {
2417
+ "text/plain": string;
2418
+ };
2419
+ };
2420
+ 404: components["responses"]["NotFound"];
2421
+ 409: components["responses"]["ValidationError"];
2422
+ 502: components["responses"]["InternalError"];
2423
+ };
2424
+ };
2251
2425
  createBillingSetupIntent: {
2252
2426
  parameters: {
2253
2427
  query?: never;
@@ -2335,6 +2509,69 @@ export interface operations {
2335
2509
  502: components["responses"]["InternalError"];
2336
2510
  };
2337
2511
  };
2512
+ getBillingProfile: {
2513
+ parameters: {
2514
+ query?: never;
2515
+ header?: never;
2516
+ path?: never;
2517
+ cookie?: never;
2518
+ };
2519
+ requestBody?: never;
2520
+ responses: {
2521
+ /** @description Billing profile, or empty fields when billing is not set up */
2522
+ 200: {
2523
+ headers: {
2524
+ [name: string]: unknown;
2525
+ };
2526
+ content: {
2527
+ "application/json": components["schemas"]["ApiResponse_BillingProfile"];
2528
+ };
2529
+ };
2530
+ 403: components["responses"]["Unauthorized"];
2531
+ 502: components["responses"]["InternalError"];
2532
+ };
2533
+ };
2534
+ updateBillingProfile: {
2535
+ parameters: {
2536
+ query?: never;
2537
+ header?: never;
2538
+ path?: never;
2539
+ cookie?: never;
2540
+ };
2541
+ requestBody: {
2542
+ content: {
2543
+ "application/json": {
2544
+ name?: string;
2545
+ /** Format: email */
2546
+ email?: string;
2547
+ phone?: string;
2548
+ address?: components["schemas"]["BillingAddressPatch"];
2549
+ };
2550
+ };
2551
+ };
2552
+ responses: {
2553
+ /** @description Saved invoice billing profile */
2554
+ 200: {
2555
+ headers: {
2556
+ [name: string]: unknown;
2557
+ };
2558
+ content: {
2559
+ "application/json": components["schemas"]["ApiResponse_BillingProfile"];
2560
+ };
2561
+ };
2562
+ /** @description Invalid profile, with fieldErrors in data */
2563
+ 400: {
2564
+ headers: {
2565
+ [name: string]: unknown;
2566
+ };
2567
+ content: {
2568
+ "application/json": components["schemas"]["BillingProfileValidationError"];
2569
+ };
2570
+ };
2571
+ 403: components["responses"]["Unauthorized"];
2572
+ 502: components["responses"]["InternalError"];
2573
+ };
2574
+ };
2338
2575
  listActivity: {
2339
2576
  parameters: {
2340
2577
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.47",
3
+ "version": "0.0.49",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",