bfocus 0.2.3__tar.gz → 0.2.4__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: bfocus
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: SDK oficial em Python da API pública do bFocus: clientes, produtos, release notes, base de conhecimento e agentes de IA.
5
5
  Project-URL: Homepage, https://bfocus.com.br
6
6
  Project-URL: Repository, https://github.com/bernisoftware/bfocus-python
@@ -1,3 +1,3 @@
1
1
  """Versão da SDK. O ``scripts/release-sdks.sh`` bumpa esta linha e o ``pyproject.toml``."""
2
2
 
3
- __version__ = "0.2.3"
3
+ __version__ = "0.2.4"
@@ -167,6 +167,11 @@ class CustomerBatchItem(_CustomerBatchItemRequired, total=False):
167
167
 
168
168
  name: Optional[str]
169
169
  document: Optional[str]
170
+ kind: Optional[Literal["pj", "pf"]]
171
+ legal_name: Optional[str]
172
+ state_registration: Optional[str]
173
+ municipal_registration: Optional[str]
174
+ id_document: Optional[str]
170
175
  email: Optional[str]
171
176
  phone: Optional[str]
172
177
  website: Optional[str]
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "bfocus"
7
- version = "0.2.3"
7
+ version = "0.2.4"
8
8
  description = "SDK oficial em Python da API pública do bFocus: clientes, produtos, release notes, base de conhecimento e agentes de IA."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -118,6 +118,188 @@
118
118
  }
119
119
  }
120
120
  },
121
+ {
122
+ "id": "customers.upsert/pj_fields",
123
+ "op": "customers.upsert",
124
+ "args": {
125
+ "external_id": "ERP 1042",
126
+ "kind": "pj",
127
+ "name": "Padaria Estrela",
128
+ "legal_name": "Estrela Panificação e Comércio Ltda",
129
+ "document": "12345678000190",
130
+ "state_registration": "ISENTO",
131
+ "municipal_registration": "1.234.567-8"
132
+ },
133
+ "exchanges": [
134
+ {
135
+ "retry": false,
136
+ "request": {
137
+ "method": "PUT",
138
+ "path": "/api/v1/integration/customers/ERP%201042",
139
+ "query": {},
140
+ "body": {
141
+ "kind": "pj",
142
+ "name": "Padaria Estrela",
143
+ "legal_name": "Estrela Panificação e Comércio Ltda",
144
+ "document": "12345678000190",
145
+ "state_registration": "ISENTO",
146
+ "municipal_registration": "1.234.567-8"
147
+ }
148
+ },
149
+ "response": {
150
+ "status": 200,
151
+ "headers": {},
152
+ "body": {
153
+ "code": 200,
154
+ "data": {
155
+ "id": "00000000-0000-4000-8000-000000000001",
156
+ "external_id": "ERP 1042",
157
+ "name": "Padaria Estrela",
158
+ "kind": "pj",
159
+ "legal_name": "Estrela Panificação e Comércio Ltda",
160
+ "state_registration": "ISENTO",
161
+ "municipal_registration": "1.234.567-8",
162
+ "id_document": null,
163
+ "document": "12345678000190",
164
+ "email": "contato@padaria.example",
165
+ "phone": null,
166
+ "website": null,
167
+ "notes": null,
168
+ "custom_fields": [
169
+ {
170
+ "key": "plano",
171
+ "label": "Plano",
172
+ "type": "text",
173
+ "value": "ouro",
174
+ "visibility": "interno"
175
+ }
176
+ ],
177
+ "is_active": true,
178
+ "logo_url": null,
179
+ "extra_emails": [],
180
+ "extra_phones": [],
181
+ "created_at": "2026-09-13T12:00:00+00:00",
182
+ "updated_at": "2026-09-13T12:00:00+00:00"
183
+ },
184
+ "message": "Executado com sucesso"
185
+ }
186
+ }
187
+ }
188
+ ],
189
+ "expect": {
190
+ "result": {
191
+ "id": "00000000-0000-4000-8000-000000000001",
192
+ "external_id": "ERP 1042",
193
+ "name": "Padaria Estrela",
194
+ "kind": "pj",
195
+ "legal_name": "Estrela Panificação e Comércio Ltda",
196
+ "state_registration": "ISENTO",
197
+ "municipal_registration": "1.234.567-8",
198
+ "id_document": null,
199
+ "document": "12345678000190",
200
+ "email": "contato@padaria.example",
201
+ "phone": null,
202
+ "website": null,
203
+ "notes": null,
204
+ "custom_fields": [
205
+ {
206
+ "key": "plano",
207
+ "label": "Plano",
208
+ "type": "text",
209
+ "value": "ouro",
210
+ "visibility": "interno"
211
+ }
212
+ ],
213
+ "is_active": true,
214
+ "logo_url": null,
215
+ "extra_emails": [],
216
+ "extra_phones": [],
217
+ "created_at": "2026-09-13T12:00:00+00:00",
218
+ "updated_at": "2026-09-13T12:00:00+00:00"
219
+ }
220
+ }
221
+ },
222
+ {
223
+ "id": "customers.upsert/pf_fields",
224
+ "op": "customers.upsert",
225
+ "args": {
226
+ "external_id": "ERP 2001",
227
+ "kind": "pf",
228
+ "name": "João da Silva",
229
+ "document": "52998224725",
230
+ "id_document": "MG-12.345.678 SSP/MG"
231
+ },
232
+ "exchanges": [
233
+ {
234
+ "retry": false,
235
+ "request": {
236
+ "method": "PUT",
237
+ "path": "/api/v1/integration/customers/ERP%202001",
238
+ "query": {},
239
+ "body": {
240
+ "kind": "pf",
241
+ "name": "João da Silva",
242
+ "document": "52998224725",
243
+ "id_document": "MG-12.345.678 SSP/MG"
244
+ }
245
+ },
246
+ "response": {
247
+ "status": 201,
248
+ "headers": {},
249
+ "body": {
250
+ "code": 201,
251
+ "data": {
252
+ "id": "00000000-0000-4000-8000-000000000003",
253
+ "external_id": "ERP 2001",
254
+ "name": "João da Silva",
255
+ "kind": "pf",
256
+ "legal_name": null,
257
+ "state_registration": null,
258
+ "municipal_registration": null,
259
+ "id_document": "MG-12.345.678 SSP/MG",
260
+ "document": "52998224725",
261
+ "email": "contato@padaria.example",
262
+ "phone": null,
263
+ "website": null,
264
+ "notes": null,
265
+ "custom_fields": [],
266
+ "is_active": true,
267
+ "logo_url": null,
268
+ "extra_emails": [],
269
+ "extra_phones": [],
270
+ "created_at": "2026-09-13T12:00:00+00:00",
271
+ "updated_at": "2026-09-13T12:00:00+00:00"
272
+ },
273
+ "message": "Executado com sucesso"
274
+ }
275
+ }
276
+ }
277
+ ],
278
+ "expect": {
279
+ "result": {
280
+ "id": "00000000-0000-4000-8000-000000000003",
281
+ "external_id": "ERP 2001",
282
+ "name": "João da Silva",
283
+ "kind": "pf",
284
+ "legal_name": null,
285
+ "state_registration": null,
286
+ "municipal_registration": null,
287
+ "id_document": "MG-12.345.678 SSP/MG",
288
+ "document": "52998224725",
289
+ "email": "contato@padaria.example",
290
+ "phone": null,
291
+ "website": null,
292
+ "notes": null,
293
+ "custom_fields": [],
294
+ "is_active": true,
295
+ "logo_url": null,
296
+ "extra_emails": [],
297
+ "extra_phones": [],
298
+ "created_at": "2026-09-13T12:00:00+00:00",
299
+ "updated_at": "2026-09-13T12:00:00+00:00"
300
+ }
301
+ }
302
+ },
121
303
  {
122
304
  "id": "customers.upsert/null_clears_field",
123
305
  "op": "customers.upsert",
@@ -1619,6 +1801,120 @@
1619
1801
  }
1620
1802
  }
1621
1803
  },
1804
+ {
1805
+ "id": "customers.batch/typed_fields",
1806
+ "op": "customers.batch",
1807
+ "args": {
1808
+ "items": [
1809
+ {
1810
+ "external_id": "ERP 1042",
1811
+ "kind": "pj",
1812
+ "legal_name": "Estrela Panificação e Comércio Ltda",
1813
+ "state_registration": "ISENTO",
1814
+ "municipal_registration": "1.234.567-8"
1815
+ },
1816
+ {
1817
+ "external_id": "ERP 2001",
1818
+ "kind": "pf",
1819
+ "name": "João da Silva",
1820
+ "id_document": "MG-12.345.678 SSP/MG"
1821
+ }
1822
+ ]
1823
+ },
1824
+ "exchanges": [
1825
+ {
1826
+ "retry": false,
1827
+ "request": {
1828
+ "method": "POST",
1829
+ "path": "/api/v1/integration/customers/batch",
1830
+ "query": {},
1831
+ "body": {
1832
+ "items": [
1833
+ {
1834
+ "external_id": "ERP 1042",
1835
+ "kind": "pj",
1836
+ "legal_name": "Estrela Panificação e Comércio Ltda",
1837
+ "state_registration": "ISENTO",
1838
+ "municipal_registration": "1.234.567-8"
1839
+ },
1840
+ {
1841
+ "external_id": "ERP 2001",
1842
+ "kind": "pf",
1843
+ "name": "João da Silva",
1844
+ "id_document": "MG-12.345.678 SSP/MG"
1845
+ }
1846
+ ]
1847
+ }
1848
+ },
1849
+ "response": {
1850
+ "status": 200,
1851
+ "headers": {},
1852
+ "body": {
1853
+ "code": 200,
1854
+ "data": {
1855
+ "results": [
1856
+ {
1857
+ "index": 0,
1858
+ "status": "updated",
1859
+ "external_id": "ERP 1042",
1860
+ "merged_into": null,
1861
+ "linked": false,
1862
+ "error": null,
1863
+ "code": null
1864
+ },
1865
+ {
1866
+ "index": 1,
1867
+ "status": "created",
1868
+ "external_id": "ERP 2001",
1869
+ "merged_into": null,
1870
+ "linked": false,
1871
+ "error": null,
1872
+ "code": null
1873
+ }
1874
+ ],
1875
+ "summary": {
1876
+ "created": 1,
1877
+ "updated": 1,
1878
+ "unchanged": 0,
1879
+ "error": 0
1880
+ }
1881
+ },
1882
+ "message": "Executado com sucesso"
1883
+ }
1884
+ }
1885
+ }
1886
+ ],
1887
+ "expect": {
1888
+ "result": {
1889
+ "results": [
1890
+ {
1891
+ "index": 0,
1892
+ "status": "updated",
1893
+ "external_id": "ERP 1042",
1894
+ "merged_into": null,
1895
+ "linked": false,
1896
+ "error": null,
1897
+ "code": null
1898
+ },
1899
+ {
1900
+ "index": 1,
1901
+ "status": "created",
1902
+ "external_id": "ERP 2001",
1903
+ "merged_into": null,
1904
+ "linked": false,
1905
+ "error": null,
1906
+ "code": null
1907
+ }
1908
+ ],
1909
+ "summary": {
1910
+ "created": 1,
1911
+ "updated": 1,
1912
+ "unchanged": 0,
1913
+ "error": 0
1914
+ }
1915
+ }
1916
+ }
1917
+ },
1622
1918
  {
1623
1919
  "id": "people.batch/partial_failure",
1624
1920
  "op": "people.batch",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes