svc-infra 0.1.587__py3-none-any.whl → 0.1.588__py3-none-any.whl

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.

Potentially problematic release.


This version of svc-infra might be problematic. Click here for more details.

@@ -254,6 +254,10 @@ class SetupIntentCreateIn(BaseModel):
254
254
  payment_method_types: list[str] = Field(default_factory=lambda: ["card"])
255
255
 
256
256
 
257
+ class WebhookReplayIn(BaseModel):
258
+ event_ids: Optional[list[str]] = None
259
+
260
+
257
261
  class WebhookReplayOut(BaseModel):
258
262
  replayed: int
259
263
 
@@ -268,6 +272,7 @@ class UsageRecordOut(BaseModel):
268
272
  timestamp: Optional[int] = None
269
273
  subscription_item: Optional[str] = None
270
274
  provider_price_id: Optional[str] = None
275
+ action: Optional[Literal["increment", "set"]] = None
271
276
 
272
277
 
273
278
  # -------- Customers list filter ----------
@@ -43,6 +43,7 @@ from svc_infra.apf_payments.schemas import (
43
43
  UsageRecordListFilter,
44
44
  UsageRecordOut,
45
45
  WebhookAckOut,
46
+ WebhookReplayIn,
46
47
  WebhookReplayOut,
47
48
  )
48
49
  from svc_infra.apf_payments.service import PaymentsService
@@ -708,10 +709,10 @@ def build_payments_routers(prefix: str = "/payments") -> list[DualAPIRouter]:
708
709
  async def replay_webhooks(
709
710
  since: Optional[str] = None,
710
711
  until: Optional[str] = None,
711
- event_ids: Optional[list[str]] = Body(default=None),
712
+ data: WebhookReplayIn = Body(default=WebhookReplayIn()),
712
713
  svc: PaymentsService = Depends(get_service),
713
714
  ):
714
- count = await svc.replay_webhooks(since, until, event_ids or [])
715
+ count = await svc.replay_webhooks(since, until, data.event_ids or [])
715
716
  await svc.session.flush()
716
717
  return {"replayed": count}
717
718
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: svc-infra
3
- Version: 0.1.587
3
+ Version: 0.1.588
4
4
  Summary: Infrastructure for building and deploying prod-ready services
5
5
  License: MIT
6
6
  Keywords: fastapi,sqlalchemy,alembic,auth,infra,async,pydantic
@@ -6,13 +6,13 @@ svc_infra/apf_payments/provider/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
6
6
  svc_infra/apf_payments/provider/base.py,sha256=1t5znglpGFhjt4zdbuzE5VlHvGarFwzH2oscK8yyKNY,7678
7
7
  svc_infra/apf_payments/provider/registry.py,sha256=NZ4pUkFcbXNtqWEpFeI3NwoKRYGWe9fVQakmlrVLTKE,878
8
8
  svc_infra/apf_payments/provider/stripe.py,sha256=Xb_UjdobbBzK-an9cO1jRWiP6OHvki5MDp6JnS6a1-I,34392
9
- svc_infra/apf_payments/schemas.py,sha256=XfBxx6z_Y6cdHktanafNDhhgWl8JVvag9vp2ORmvn_4,8403
9
+ svc_infra/apf_payments/schemas.py,sha256=H2GdUtUv8iUIQNy5GaC07KEGFowERpucbWXH7JmgI7g,8538
10
10
  svc_infra/apf_payments/service.py,sha256=bn3BTOTdfkJ4b0Z9cHuFHvlMcv9B1b2n0v-unveUplA,31060
11
11
  svc_infra/apf_payments/settings.py,sha256=VnNQbajbv843buUisqa82xOQ-f5JA8JzHD8o01-yhPQ,1239
12
12
  svc_infra/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  svc_infra/api/fastapi/__init__.py,sha256=VVdQjak74_wTDqmvL05_C97vIFugQxPVU-3JQEFBgR8,747
14
14
  svc_infra/api/fastapi/apf_payments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- svc_infra/api/fastapi/apf_payments/router.py,sha256=cee_MQ7VBlcsc9oMN1L9s-IjdNENvYgjLWwPIeoGPEM,34889
15
+ svc_infra/api/fastapi/apf_payments/router.py,sha256=_9bqyZ9ZZsX43_b2LCghipPLkkHIEcswpR0yJxry-1U,34919
16
16
  svc_infra/api/fastapi/apf_payments/setup.py,sha256=PX-LHDiyu2eDuaw2m98VPUkF6EmXXRkbjRqh_gL8Kls,2263
17
17
  svc_infra/api/fastapi/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  svc_infra/api/fastapi/auth/_cookies.py,sha256=U4heUmMnLezHx8U6ksuUEpSZ6sNMJcIO0gdLpmZ5FXw,1367
@@ -228,7 +228,7 @@ svc_infra/obs/templates/sidecars/railway/__init__.py,sha256=47DEQpj8HBSa-_TImW-5
228
228
  svc_infra/obs/templates/sidecars/railway/agent.yaml,sha256=hYv35yG92XEP_4joMFmMcVTD-4fG_zHitmChjreUJh4,516
229
229
  svc_infra/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
230
  svc_infra/utils.py,sha256=VX1yjTx61-YvAymyRhGy18DhybiVdPddiYD_FlKTbJU,952
231
- svc_infra-0.1.587.dist-info/METADATA,sha256=hirPy7fbFdNdvqQWb1ycjYOl7sqPuJHgZPcQO4LDGf8,3487
232
- svc_infra-0.1.587.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
233
- svc_infra-0.1.587.dist-info/entry_points.txt,sha256=6x_nZOsjvn6hRZsMgZLgTasaCSKCgAjsGhACe_CiP0U,48
234
- svc_infra-0.1.587.dist-info/RECORD,,
231
+ svc_infra-0.1.588.dist-info/METADATA,sha256=eS-kLmfGUFg-a3eoZW7T7MuTeU5RgPkizoyv6wGVSZE,3487
232
+ svc_infra-0.1.588.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
233
+ svc_infra-0.1.588.dist-info/entry_points.txt,sha256=6x_nZOsjvn6hRZsMgZLgTasaCSKCgAjsGhACe_CiP0U,48
234
+ svc_infra-0.1.588.dist-info/RECORD,,