diff --git a/core/plugin/provider.go b/core/plugin/provider.go index 7e4cf83..e415332 100644 --- a/core/plugin/provider.go +++ b/core/plugin/provider.go @@ -43,6 +43,8 @@ const ( CategoryDevTools Category = "devtools" CategoryCRM Category = "crm" CategoryPackages Category = "packages" + // CategoryStorage is file storage and sync: Dropbox, not a database. + CategoryStorage Category = "storage" ) // Categories are every category, in display order. @@ -51,6 +53,7 @@ func Categories() []Category { CategoryAI, CategoryPayments, CategoryInfrastructure, CategoryDatabases, CategoryMonitoring, CategoryAnalytics, CategoryAuth, CategoryMessaging, CategoryHosting, CategorySearch, CategoryDevTools, CategoryCRM, CategoryPackages, + CategoryStorage, } } diff --git a/docs/plugins.schema.json b/docs/plugins.schema.json index 16eba69..552d275 100644 --- a/docs/plugins.schema.json +++ b/docs/plugins.schema.json @@ -15,7 +15,7 @@ "categories": { "type": "array", "description": "Every category, in display order.", - "items": { "type": "string", "enum": ["ai", "payments", "infrastructure", "databases", "monitoring", "analytics", "auth", "messaging", "hosting", "search", "devtools", "crm", "packages"] } + "items": { "type": "string", "enum": ["ai", "payments", "infrastructure", "databases", "monitoring", "analytics", "auth", "messaging", "hosting", "search", "devtools", "crm", "packages", "storage"] } }, "providers": { "type": "array", @@ -26,7 +26,7 @@ "properties": { "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" }, "name": { "type": "string", "minLength": 1 }, - "category": { "type": "string", "enum": ["ai", "payments", "infrastructure", "databases", "monitoring", "analytics", "auth", "messaging", "hosting", "search", "devtools", "crm", "packages"] }, + "category": { "type": "string", "enum": ["ai", "payments", "infrastructure", "databases", "monitoring", "analytics", "auth", "messaging", "hosting", "search", "devtools", "crm", "packages", "storage"] }, "homepage": { "type": "string", "pattern": "^https://" }, "sources": { "type": "array", diff --git a/kinds/catalog/catalog.go b/kinds/catalog/catalog.go index ead5974..559f76e 100644 --- a/kinds/catalog/catalog.go +++ b/kinds/catalog/catalog.go @@ -4,8 +4,9 @@ // name (and, for a list of upcoming changes, its date and what to use // instead). Each reader is a plugin of its own in this package, read // version by version (plugin.Versioned): Redis's commands at each release -// tag (Commands, commands.go), GitHub's GraphQL upcoming changes at each commit -// (UpcomingChanges, upcoming.go). +// tag (Commands, commands.go), GitHub's GraphQL upcoming changes at each +// commit (UpcomingChanges, upcoming.go), Dropbox's Stone IDL route +// declarations at each commit (Routes, routes.go). // // Precision over recall: a name that moves (a genuine rename) reads as one // removal and one addition, same as any other. A reader never guesses a diff --git a/kinds/catalog/routes.go b/kinds/catalog/routes.go new file mode 100644 index 0000000..49bfb8d --- /dev/null +++ b/kinds/catalog/routes.go @@ -0,0 +1,285 @@ +package catalog + +import ( + "context" + "encoding/json" + "fmt" + "path" + "regexp" + "sort" + "strings" + + "github.com/patch-it-dev/patch-it-plugins/core/event" + "github.com/patch-it-dev/patch-it-plugins/core/github" + "github.com/patch-it-dev/patch-it-plugins/core/plugin" + "github.com/patch-it-dev/patch-it-plugins/core/versions" +) + +// Routes is a provider's own file of named operations, kept as plain text +// in its repo and read at each commit that changed it: Dropbox's Stone IDL +// namespace files (dropbox/dropbox-api-spec), each line `route name(Args, +// Result, Error)`, optionally followed by `deprecated` or `deprecated by +// other_name`. Unlike Commands (one file per command, at a release tag) or +// UpcomingChanges (dated entries in one JSON file), a version here is a +// commit and an entry is just a name on one line of free-form text: the +// name, not the line, is what's compared, so a release that only reorders +// or reformats the file (Dropbox did, in the commit the golden test is +// pinned on either side of) reads as no change, never as every route +// removed and added back. A removed name and an added name that compute +// the same Operation in the same pair are a renamed spelling, not a +// removal (real, 2018-08-14: Dropbox's own copy_v2 became copy:2, the same +// call either way) — the one case a plain name diff can't tell apart from +// a real removal on its own. A namespace can also be declared in more than +// one file (Dropbox's files namespace was, in files_properties.stone in +// 2016-2017 and file_tagging.stone from 2021 to 2026, whose routes then +// moved into files.stone): a name that looks removed or added is checked +// against every other .stone file declaring the same namespace at that +// commit, and one found there moved, which is neither. +type Routes struct { + API string // the source id the events carry: "dropbox/files-api" + Vendor string // for sentences: "Dropbox" + Repo string // owner/name on GitHub + Path string // the file's path in the repo: "files.stone" + // Operation turns a route's own name, as the file declares it + // ("search:2", "properties/template/list"), into the HTTP call it is. + // Also what tells a renamed spelling from a real removal: see above. + Operation func(name string) string + + shape *plugin.Shape // the source's, set by RegisterProvider (WithShape); nil: no guard +} + +// RoutesMinRatio is the shape guard's ratio for a route file: like a +// command catalog, a provider deprecates far more often than it deletes, so +// only a file left with under 80% of the routes the read before found +// changed shape. +const RoutesMinRatio = 0.8 + +func (r Routes) Name() string { return r.API } + +// WithShape is r guarding its pairs with s. +func (r Routes) WithShape(s plugin.Shape) plugin.Plugin { + r.shape = &s + return r +} + +// FileURL is the file at one commit: its own provenance, as a commit SHA +// never changes. +func (r Routes) FileURL(sha string) string { + return fmt.Sprintf("https://raw.githubusercontent.com/%s/%s/%s", r.Repo, sha, r.Path) +} + +// ListVersions is every commit that changed the file, oldest first. +func (r Routes) ListVersions(ctx context.Context, env plugin.Env) ([]plugin.Version, error) { + return versions.GitHubCommits(ctx, env.Get, r.Repo, r.Path) +} + +// ReadAt fetches the file at v's commit. +func (r Routes) ReadAt(ctx context.Context, env plugin.Env, v plugin.Version) (plugin.Snapshot, error) { + url := r.FileURL(v.Ref) + body, err := env.Get(ctx, url) + if err != nil { + return plugin.Snapshot{}, fmt.Errorf("fetching %s: %w", url, err) + } + return plugin.Snapshot{Version: v, Content: body, SourceURL: url}, nil +} + +// routeDecl matches one route declaration line: `route name(...)` or +// `route name (...)`, its first submatch the bare name, up to the first +// space or `(`, so a trailing ` deprecated` or ` deprecated by x` is never +// part of it. Declared at the start of a line (unindented), as every route +// in a Stone namespace file is; a struct or union field never starts a line +// this way. +var routeDecl = regexp.MustCompile(`(?m)^route ([^\s(]+)\s*\(.*$`) + +// routesIn is every route declaration in content, by name, to its whole +// line (the excerpt an event quotes). +func routesIn(content []byte) map[string]string { + out := map[string]string{} + for _, m := range routeDecl.FindAllStringSubmatch(string(content), -1) { + out[m[1]] = m[0] + } + return out +} + +// Extract is a breaking event per route declared in from's file and gone +// from to's, and an added one per route declared in to's and not in from's, +// each citing the file at the version whose content it quotes (from's for a +// removal, to's for an addition), with previous_version from's commit. A +// zero from has nothing to compare. +func (r Routes) Extract(ctx context.Context, env plugin.Env, from, to plugin.Snapshot) (plugin.Result, error) { + if from.IsZero() { + return plugin.Result{}, nil + } + before := routesIn(from.Content) + after := routesIn(to.Content) + if err := r.shape.CheckCount("routes", RoutesMinRatio, len(before), len(after)); err != nil { + return plugin.Result{}, fmt.Errorf("reading %s: %w", to.SourceURL, err) + } + // renamedTo/renamedFrom catch Dropbox renaming a route's own Stone + // spelling while the real HTTP call stays identical (confirmed real, + // 2018-08-14: copy_v2 -> copy:2, create_folder_v2 -> create_folder:2, + // delete_v2 -> delete:2, move_v2 -> move:2, + // upload_session/append_v2 -> upload_session/append:2 — every one + // still the same /2/files/_v2 call). A removed name and an added + // name that compute the same Operation are that rename: neither event, + // the same rule Commands applies to a command file that moves. + renamedTo := map[string]bool{} // by the operation a removed name used to answer to + renamedFrom := map[string]bool{} // by the operation an added name now answers to + for n := range before { + if _, ok := after[n]; !ok { + renamedTo[r.Operation(n)] = true + } + } + for n := range after { + if _, ok := before[n]; !ok { + renamedFrom[r.Operation(n)] = true + } + } + names := map[string]bool{} + for n := range before { + names[n] = true + } + for n := range after { + names[n] = true + } + sorted := make([]string, 0, len(names)) + for n := range names { + sorted = append(sorted, n) + } + sort.Strings(sorted) + var removed, added []string + for _, n := range sorted { + _, wasBefore := before[n] + _, isAfter := after[n] + op := r.Operation(n) + switch { + case wasBefore && !isAfter && !renamedFrom[op]: + removed = append(removed, n) + case !wasBefore && isAfter && !renamedTo[op]: + added = append(added, n) + } + } + ns := namespaceOf(to.Content) + if ns == "" { + ns = namespaceOf(from.Content) + } + movedTo, movedFrom := map[string]bool{}, map[string]bool{} + if len(removed) > 0 { + var err error + if movedTo, err = r.elsewhere(ctx, env, to.Version.Ref, ns); err != nil { + return plugin.Result{}, err + } + } + if len(added) > 0 { + var err error + if movedFrom, err = r.elsewhere(ctx, env, from.Version.Ref, ns); err != nil { + return plugin.Result{}, err + } + } + changed := map[string]bool{} + for _, n := range append(removed, added...) { + changed[n] = true + } + var made []event.Event + now := env.Now().UTC() + for _, n := range sorted { + if !changed[n] { + continue + } + beforeLine, wasBefore := before[n] + afterLine := after[n] + switch { + case wasBefore && movedTo[n], !wasBefore && movedFrom[n]: + // Declared in another file of the same namespace: moved. + case wasBefore: + made = append(made, event.Event{ + API: r.API, Version: to.Version.ID, PreviousVersion: from.Version.ID, + Change: event.ChangeBreaking, + Subject: event.Subject{Type: event.SubjectAPIOperation, Kind: event.KindOperation, Side: event.SideRequest, + Operation: r.Operation(n)}, + Description: fmt.Sprintf("%s's %s route is gone from its API spec (it was there as of %s): calling it fails.", r.Vendor, n, from.Version.ID), + SourceURL: from.SourceURL, + SourceExcerpt: beforeLine, + Confidence: 1.0, + DetectedAt: now, + }) + default: + made = append(made, event.Event{ + API: r.API, Version: to.Version.ID, PreviousVersion: from.Version.ID, + Change: event.ChangeAdded, + Subject: event.Subject{Type: event.SubjectAPIOperation, Kind: event.KindOperation, Side: event.SideRequest, + Operation: r.Operation(n)}, + Description: fmt.Sprintf("%s's %s route is new in its API spec (it wasn't there as of %s).", r.Vendor, n, from.Version.ID), + SourceURL: to.SourceURL, + SourceExcerpt: afterLine, + Confidence: 1.0, + DetectedAt: now, + }) + } + } + events, rejected := finish(r.API, made, nil) + return plugin.Result{Events: events, Rejected: rejected}, nil +} + +var namespaceDecl = regexp.MustCompile(`(?m)^namespace (\S+)`) + +// namespaceOf is the namespace a Stone file declares, "" for none. +func namespaceOf(content []byte) string { + if m := namespaceDecl.FindSubmatch(content); m != nil { + return string(m[1]) + } + return "" +} + +// ListingURL is GitHub's listing, at a commit, of the directory the file is in. +func (r Routes) ListingURL(sha string) string { + dir := path.Dir(r.Path) + if dir == "." { + return fmt.Sprintf("%s/repos/%s/contents?ref=%s", github.API, r.Repo, sha) + } + return fmt.Sprintf("%s/repos/%s/contents/%s?ref=%s", github.API, r.Repo, dir, sha) +} + +// elsewhere is every route declared at sha in the other .stone files of the +// file's directory that declare namespace ns. An error is returned, never +// guessed past: a removal that can't be checked isn't reported. +func (r Routes) elsewhere(ctx context.Context, env plugin.Env, sha, ns string) (map[string]bool, error) { + out := map[string]bool{} + if ns == "" { + return out, nil + } + u := r.ListingURL(sha) + body, err := env.Get(ctx, u) + if err != nil { + return nil, fmt.Errorf("listing %s's other files at %s: %w", r.Path, sha, err) + } + var entries []struct { + Path string `json:"path"` + Type string `json:"type"` + } + if err := json.Unmarshal(body, &entries); err != nil { + return nil, fmt.Errorf("parsing the listing at %s: %w", sha, err) + } + for _, e := range entries { + if e.Type != "file" || !strings.HasSuffix(e.Path, ".stone") || e.Path == r.Path { + continue + } + fu := fmt.Sprintf("%s/%s/%s/%s", github.Raw, r.Repo, sha, e.Path) + content, err := env.Get(ctx, fu) + if err != nil { + return nil, fmt.Errorf("fetching %s: %w", fu, err) + } + if namespaceOf(content) != ns { + continue + } + for n := range routesIn(content) { + out[n] = true + } + } + return out, nil +} + +var ( + _ plugin.Versioned = Routes{} + _ plugin.Guarded = Routes{} +) diff --git a/kinds/catalog/routes_test.go b/kinds/catalog/routes_test.go new file mode 100644 index 0000000..265414b --- /dev/null +++ b/kinds/catalog/routes_test.go @@ -0,0 +1,85 @@ +package catalog + +import ( + "context" + "fmt" + "testing" + "time" + + "github.com/patch-it-dev/patch-it-plugins/core/github" + "github.com/patch-it-dev/patch-it-plugins/core/plugin" +) + +// A route's name stops at the first space or `(`: a trailing ` deprecated` +// or ` deprecated by other_name` is never part of it, and the two spacing +// styles Dropbox's file has used (`route x(...)` and `route x (...)`) both +// read the same name. +func TestRoutesInReadsTheNameOnly(t *testing.T) { + content := []byte(`namespace files + +route copy (RelocationArg, Metadata, RelocationError) deprecated +route copy:2(RelocationArg, RelocationResult, RelocationError) +route search/continue:2 (SearchV2ContinueArg, SearchV2Result, SearchError) deprecated by search/continue:3 + route indented (Arg, Result, Error) +`) + got := routesIn(content) + want := map[string]bool{"copy": true, "copy:2": true, "search/continue:2": true} + if len(got) != len(want) { + t.Fatalf("routesIn = %v, want keys %v", got, want) + } + for name := range want { + if _, ok := got[name]; !ok { + t.Errorf("missing %q", name) + } + } + if _, ok := got["indented"]; ok { + t.Error("an indented line isn't a top-level route declaration") + } +} + +// A route gone from the file but declared at the newer commit in another +// file of the same namespace moved: no event. The same name in a file of +// another namespace is a different route, so that one is a removal. A +// listing that can't be read fails the pair rather than reporting. +func TestARouteMovedToAnotherFileOfItsNamespaceIsNoRemoval(t *testing.T) { + r := Routes{API: "x/files-api", Vendor: "X", Repo: "o/r", Path: "files.stone", + Operation: func(n string) string { return "POST /2/files/" + n }} + from := plugin.Snapshot{Version: plugin.Version{ID: "2026-01-01", Ref: "aaa"}, SourceURL: r.FileURL("aaa"), + Content: []byte("namespace files\nroute keep(A, B, C)\nroute tags/add(A, B, C)\n")} + to := plugin.Snapshot{Version: plugin.Version{ID: "2026-02-01", Ref: "bbb"}, SourceURL: r.FileURL("bbb"), + Content: []byte("namespace files\nroute keep(A, B, C)\n")} + listing := `[{"path":"files.stone","type":"file"},{"path":"tagging.stone","type":"file"},{"path":"README.md","type":"file"}]` + for _, c := range []struct { + name, tagging string + events int + fails bool + }{ + {"same namespace", "namespace files\nroute tags/add (A, B, C)\n", 0, false}, + {"other namespace", "namespace sharing\nroute tags/add (A, B, C)\n", 1, false}, + {"unreadable listing", "", 0, true}, + } { + t.Run(c.name, func(t *testing.T) { + pages := map[string]string{github.Raw + "/o/r/bbb/tagging.stone": c.tagging} + if !c.fails { + pages[r.ListingURL("bbb")] = listing + } + env := plugin.Env{Now: func() time.Time { return time.Date(2026, 2, 2, 0, 0, 0, 0, time.UTC) }, + Get: func(_ context.Context, u string) ([]byte, error) { + if b, ok := pages[u]; ok { + return []byte(b), nil + } + return nil, fmt.Errorf("no page %s", u) + }} + res, err := r.Extract(context.Background(), env, from, to) + if c.fails { + if err == nil { + t.Fatalf("got %d events and no error, want an error", len(res.Events)) + } + return + } + if err != nil || len(res.Events) != c.events { + t.Fatalf("got %d events, err %v; want %d", len(res.Events), err, c.events) + } + }) + } +} diff --git a/kinds/catalog/shape_test.go b/kinds/catalog/shape_test.go index bdfcb24..07ebe8f 100644 --- a/kinds/catalog/shape_test.go +++ b/kinds/catalog/shape_test.go @@ -39,6 +39,27 @@ func TestACatalogThatLostMostCommandsChangedShape(t *testing.T) { } } +// A route file that lost most of its declarations (a different file served +// in its place, or most of it deleted) changed shape; one that reorders or +// reformats its routes, with every name still there, didn't. +func TestARouteFileThatLostMostRoutesChangedShape(t *testing.T) { + env := plugin.Env{Now: time.Now} + decls := func(n int) []byte { + var b []byte + for i := 0; i < n; i++ { + b = append(b, []byte(fmt.Sprintf("route r%d (Arg, Result, Error)\n", i))...) + } + return b + } + r := Routes{API: "acme/api", Vendor: "Acme", Repo: "acme/acme", Path: "api.stone", Operation: func(n string) string { return "POST /2/" + n }} + if _, err := r.WithShape(plugin.Shape{}).Extract(context.Background(), env, + plugin.Snapshot{Version: plugin.Version{ID: "1"}, Content: decls(200), SourceURL: "https://x.test/1"}, + plugin.Snapshot{Version: plugin.Version{ID: "2"}, Content: decls(20), SourceURL: "https://x.test/2"}, + ); !errors.Is(err, plugin.ErrShapeChanged) { + t.Errorf("200 -> 20 routes: %v, want ErrShapeChanged", err) + } +} + // A file of upcoming changes that suddenly lists nothing (reformatted, or // emptied by a bad commit) fails the guard; entries leaving in a batch when // their date passes don't. diff --git a/providers/all/all.go b/providers/all/all.go index d65e3b8..3871acb 100644 --- a/providers/all/all.go +++ b/providers/all/all.go @@ -10,6 +10,7 @@ import ( _ "github.com/patch-it-dev/patch-it-plugins/providers/cloudflare" _ "github.com/patch-it-dev/patch-it-plugins/providers/convex" _ "github.com/patch-it-dev/patch-it-plugins/providers/datadog" + _ "github.com/patch-it-dev/patch-it-plugins/providers/dropbox" _ "github.com/patch-it-dev/patch-it-plugins/providers/elastic" _ "github.com/patch-it-dev/patch-it-plugins/providers/flagsmith" _ "github.com/patch-it-dev/patch-it-plugins/providers/github" diff --git a/providers/dropbox/README.md b/providers/dropbox/README.md new file mode 100644 index 0000000..3aa1a48 --- /dev/null +++ b/providers/dropbox/README.md @@ -0,0 +1,78 @@ +# Dropbox + +Every source patch-it reads for Dropbox, one section each: what it watches, why this source, what it reads and ignores, its known gaps. Each is registered in [`provider.go`](provider.go) and read by its kind ([`kinds/`](../../kinds/)); the saved copies its tests replay, and the golden files, are in [`testdata/`](testdata/README.md). + +## Dropbox files API (`dropbox/files-api`) + +### What it watches + +Routes removed or added in the files namespace of Dropbox's own API spec (upload, download, copy, move, delete, search, thumbnails, revisions, file properties, tags, locks): `files.stone` in [`dropbox/dropbox-api-spec`](https://github.com/dropbox/dropbox-api-spec), read at each commit that changed it. + +Kind: `catalog` (`kinds/catalog`), the `Routes` reader (`kinds/catalog/routes.go`, new for this source). + +### Why this source + +- **Source:** [`files.stone`](https://github.com/dropbox/dropbox-api-spec/blob/main/files.stone) in dropbox/dropbox-api-spec, read raw at each commit (`https://raw.githubusercontent.com/dropbox/dropbox-api-spec//files.stone`, a commit SHA never changing). Checked 2026-11-21: 67 routes, 69 commits to this file since 2016-05-24, 15 since 2026-01-01. +- **Why this one:** it's Dropbox's own IDL (Stone), the one file every official SDK (Python, JavaScript, .NET, Java, Swift, Objective-C) is generated from, and the repo's `README.md` says so directly. A route declared here and nowhere else is the ground truth for what a caller can call; the repo has no release tags, so a commit is the version, as for Convex's and Supabase's specs. +- **Alternatives considered:** + - **`openapi/openapi.yaml`**, a full OpenAPI 3 document in the same repo, generated by Dropbox's own bot (`dropbox-spec-updater[bot]`) on every spec change. This is the more conventional, typed source (an `openapi` kind plugin, like `convex/deployment-api`), and it is genuinely official: checked 2026-11-21, it has 267 paths and 44 operations already marked `deprecated: true`, e.g. `POST /2/sharing/get_shared_links` ("DEPRECATED: Use list_shared_links instead. This endpoint will be retired in October 2026."). Not used for this source because the file is new (added 2026-11-17, two commits in its own history as of the date checked) and has no real removal in that short history yet to measure or replay; `files.stone` has nine years of commits and a real, dated one (see Quote). Worth revisiting once the OpenAPI export has more history of its own — its `deprecated` flags are a cleaner signal than Stone's free-text ` deprecated` suffix. + - **The repo's commit messages**, which a bot (and, before it, `release_note_generator.py`) writes as structured "Added/Removed/Deprecated" bullets. Read by hand across the whole history for this page (see Quote and the next section); not used as the source itself because the bullets are prose, not every commit has them in the same shape (the `release_note_generator.py` era wrote `- Remove x, y routes`; the newer bot writes "### Removed files" or nothing for a removal that isn't a whole-file deletion), and the file itself is the more reliable thing to diff. + - **`dropbox.com/developers`'s deprecations and changelog pages.** No page dedicated to API deprecations was found; Dropbox's own developer blog (`dropbox.tech`) covers deprecations in prose, years apart, with no feed. [See the community's own question](https://www.dropboxforum.com/discussions/101000014/is-there-any-open-api-a-k-a-swagger-spec-for-dropbox-api/786323) asking whether a machine-readable spec exists at all (it does: this one). + - **The official SDKs' changelogs** (`dropbox-sdk-python`, `dropbox-sdk-js`): generated from this same spec; reading the spec directly is one source for every SDK instead of one per language. +- **Quote:** real commit `6c68656c` (2026-05-12) removes `route properties/remove(file_properties.RemovePropertiesArg, Void, file_properties.RemovePropertiesError) deprecated`, `properties/template/get` and `properties/template/list` (all three already marked `deprecated` in the commit before, `c8364404`, 2023-04-26) — the golden test's pair. + +### How the provider announces changes + +- **No API version.** Dropbox's REST API has no version number or date in its path (every route is under `/2/`); the event's `version` is the spec commit's committer date (UTC), the closest thing to the API version a change arrived in, as for Convex, Supabase and Appwrite. +- **A route is marked `deprecated` (optionally `deprecated by other_name`) in the file for a long time before it's ever removed**, often years: `change_file_member_access` was marked deprecated in 2017 (`4483042b`) and removed in 2021 (`4c2256e5`); `properties/remove` and its two siblings were deprecated well before 2023 and removed in 2026. This source doesn't read the `deprecated` marker itself (see below): it reports the removal, which is the point a caller's existing code actually breaks. +- **The file is edited in bursts**, not steadily: no commit touched `files.stone` between 2023-04-26 and 2026-05-12, then fifteen times from May to November 2026. + +### What the plugin reads and ignores + +- **Reads** every line matching `^route name(...)`, by name only (never the route's argument, result or error types, or whether it's marked `deprecated`): a name in the older commit's file and gone from the newer's is a `breaking` `api_operation` event; a name new in the newer commit's file is `added`. The excerpt quotes the whole declaration line, deprecation marker included when there is one. +- **Ignores** everything else in the file: structs, unions, docstrings, route attributes (`attrs`, `scope`, `is_preview`…) and whether a surviving route's own signature changed shape. A route that keeps its name but changes its request or response type isn't seen. +- **A route renamed to a different Stone spelling for the same real call is matched by operation, not name, and isn't an event.** Real and found by walking the full history, not from the saved fixtures: on 2018-08-14 (`ff540e4a`) Dropbox renamed `copy_v2`, `create_folder_v2`, `delete_v2`, `move_v2` and `upload_session/append_v2` to `copy:2`, `create_folder:2`, `delete:2`, `move:2` and `upload_session/append:2` — every one still the same `/2/files/_v2` call. A route moving to another namespace is a removal, rightly: its HTTP path changes with it (`/2/files/x` to `/2//x`). +- **A route that moves to or from another file of the namespace isn't an event.** A namespace can span several `.stone` files, and `files` has: `files_properties.stone` (2016-06-20 to 2017-09-18, whose 8 routes then moved into `files.stone`) and `file_tagging.stone` (2021-11-03 to 2026-05-12, whose `tags/add`, `tags/get` and `tags/remove` then moved into `files.stone`, in the golden test's pair). Checked across all 169 commits of the repo on 2026-11-22; today `files.stone` is the namespace's only file. A name that looks removed or added is looked for in every other `.stone` file at that commit (GitHub's listing of the directory, then each file's `namespace` line), only when the pair has one; found there, it moved. Over the 68 real pairs this drops 11 additions that were moves and no removal (the 3 real ones stay). A route only ever declared in another file isn't read at all. +- **A reorder or reformat of the file is never a change.** The file's May-to-November 2026 commits reorder large stretches of `files.stone` (confirmed on the 2026-05-12 commit: a line diff of that single commit shows nearly every route as both removed and re-added); comparing the set of declared names, not lines, is why that reads as no change. The golden test is pinned on exactly that commit for this reason. +- **The pinned drop test:** the next real commit (`a4fc0169`, 2026-06-07) only edits comments and `@common.Deprecated` field annotations inside structs — zero route names appear or disappear, and zero events are stored. + +### Known gaps + +- **Deprecation isn't its own event yet.** A route marked `deprecated` in the file, with its replacement still working, isn't reported until the route is actually removed — unlike `eol`'s or `changelog/json`'s sources, which emit a `deprecated` event at the announcement. Dropbox's deprecations run for years (see above), so this misses real advance notice; reading the ` deprecated` / ` deprecated by x` suffix is a natural next step, probably alongside switching to `openapi/openapi.yaml` once it has history (see Alternatives considered). +- **Only the files namespace is read.** Dropbox's spec has about twenty other namespaces (`sharing`, `team`, `paper`, `account`…); each would be its own source, same reader, a different `Path`. `dropbox/python-surface` (below) sees them, as SDK methods. +- **The patch-it client needs `dropbox` in its list of date-versioned APIs** to place these events' date `version`, as `convex`, `supabase` and `appwrite` do; that list is outside this repo. +- **A route whose name is reused for something unrelated reads as unchanged.** Stone has no stable identifier beyond the name; this hasn't happened in this file's history. + +## Python SDK (`dropbox/python-surface`) + +### What it watches + +The public API of the `dropbox` package on PyPI, release by release: classes, functions and methods removed or renamed, parameters removed, and parameters that lost their default (callers must now pass them). One `package_release` event per change. Every final release is listed from PyPI, and each consecutive pair is compared. What a release adds is an `added` event. + +Kind: `apisurface` (`kinds/apisurface`), with the Python reader (`kinds/apisurface/pysurface`). + +### Why this source + +- **Source:** the release files on PyPI (), each release's wheel read as published; the code is at . Checked 2026-11-22. +- **Why this one, next to `files-api`:** nearly all of the package is generated by Stone from the same spec (`base.py`, `files.py`, `sharing.py`, `team.py`…), so this isn't a second view of hand-written code: it's the spec as Python callers see it. That covers what `files-api` doesn't read: every namespace, not only `files`, and every method's parameters, not only route names. Walked against the real wheels of every final release from 11.0.0 to 12.2.5 on 2026-11-22: 46 breaking events over 49 pairs, every one in a generated module, e.g. `files_get_thumbnail`'s `quality` parameter gone in 12.2.2 (a call passing it raises `TypeError`; `files-api` can't see a parameter) and `team.BulkSuspend*` gone in 12.2.3 (the `team` namespace). Where a route in the `files` namespace is removed, both sources report it, once as a route and once as a method (`files_properties_remove`, 12.2.0, is `properties/remove` in `files-api`'s golden test); OpenAI's `openai/api` and `openai/python-surface` overlap the same way. +- **Alternatives considered:** `UPGRADING.md` in the same repo (major versions only, prose); GitHub release notes (lists of "Automated Spec Update" pull requests, no per-method detail). +- **Quote:** `def sharing_remove_file_member(self, file, member)` (`dropbox/base.py` line 6054, already warning `"remove_file_member is deprecated."`) at 12.2.3, gone at 12.2.4. + +### How the provider announces changes + +- **A patch release can break.** 12.2.2, 12.2.3, 12.2.4 and 12.2.5 each removed public methods, parameters or classes: the SDK is regenerated whenever the spec changes, and a route the spec drops leaves the SDK in the next release, deprecated or not. +- **Releases are yanked:** 10.11.0 and 12.0.0 are, and aren't listed: a pair skips them. +- **Forced on upgrade**, for a repo whose pin reaches the release. + +### What the plugin reads and ignores + +- Reads the `.py` files under `dropbox/` in the release's wheel as text, never importing or running them, by the kind's rules (see `redis/redis-py-surface`): module-level classes and functions, the methods of module-level classes, their parameters and defaults, `__all__`, and `__init__.py`'s re-exports. +- Ignores private names, including a name left out of its module's `__all__`. +- A generated method is named for its class: `base.DropboxBase.sharing_remove_file_member`, the method customer code calls on `dropbox.Dropbox`, which inherits it. +- The pinned drop test: 12.2.0 → 12.2.1 reformats most of `base.py`'s method signatures (169 of its 180 methods split one parameter per line at 12.2.0, 34 at 12.2.1) and changes none: no events. + +### Known gaps + +- The kind's own gaps (see `redis/redis-py-surface`): a positional parameter renamed reads as removed; type changes aren't events. +- **A module named like its package reads ambiguously.** In 10.10.0 → 11.0.0 (the real pair; 10.11.0 is yanked), `dropbox/dropbox.py` became `dropbox/dropbox_client.py`, and the event for its `Dropbox` class reads `dropbox.Dropbox` removed, though `dropbox.Dropbox` from the package (what nearly every caller writes) kept working; only `dropbox.dropbox.Dropbox` broke. No module by that name has existed since, so this can't recur, but a backfill over that pair emits it. +- **`dropbox-sdk-js`** (npm `dropbox`), generated the same way, isn't read yet: same kind, a second source. diff --git a/providers/dropbox/files_api_test.go b/providers/dropbox/files_api_test.go new file mode 100644 index 0000000..13841dd --- /dev/null +++ b/providers/dropbox/files_api_test.go @@ -0,0 +1,96 @@ +package dropbox + +import ( + "testing" + + "github.com/patch-it-dev/patch-it-plugins/core/kit/kittest" + "github.com/patch-it-dev/patch-it-plugins/core/plugin" +) + +func TestFilesAPIRegistersItself(t *testing.T) { + kittest.Registered(t, FilesAPI) +} + +// The golden test: two real, consecutive commits of files.stone (the file +// didn't change in between: checked 2026-11-21, no commit touches it from +// 2023-04-26 to 2026-05-12). properties/remove, properties/template/get and +// properties/template/list (all three already marked `deprecated` at +// c8364404) are gone at 6c68656c; upload_session/append_batch is new. +// tags/add, tags/get and tags/remove are new to files.stone but not to the +// namespace: at c8364404 they're in file_tagging.stone, also namespace +// files, which 6c68656c deletes. Moved: no event. Every other route is unchanged, even +// though the file reorders many of them between the two commits: a line +// diff would read most of the file as removed and re-added, which is why +// Routes compares names, never lines. +func TestFilesAPIGolden(t *testing.T) { + env := kittest.Env(t, kittest.Pages{ + FilesAPI.FileURL("c8364404953d875801d496a81f786c5545f78223"): "testdata/dropbox-files-c8364404.stone", + FilesAPI.FileURL("6c68656caafdff65a30943fe186a1800b9f35bbc"): "testdata/dropbox-files-6c68656c.stone", + FilesAPI.ListingURL("c8364404953d875801d496a81f786c5545f78223"): "testdata/dropbox-spec-listing-c8364404.json", + FilesAPI.ListingURL("6c68656caafdff65a30943fe186a1800b9f35bbc"): "testdata/dropbox-spec-listing-6c68656c.json", + "https://raw.githubusercontent.com/dropbox/dropbox-api-spec/c8364404953d875801d496a81f786c5545f78223/file_tagging.stone": "testdata/dropbox-file_tagging-c8364404.stone", + }) + got := kittest.Versions(t, env, FilesAPI, + plugin.Version{ID: "2023-04-26", Ref: "c8364404953d875801d496a81f786c5545f78223"}, + plugin.Version{ID: "2026-05-12", Ref: "6c68656caafdff65a30943fe186a1800b9f35bbc"}) + kittest.Golden(t, "testdata/golden/dropbox-files-api.json", got) +} + +// The pinned drop test: the very next real commit to touch files.stone +// (2026-06-07) only changes field-level comments and annotations. Not one +// route's name appears or disappears, so nothing is stored. +func TestFilesAPIDropsACommentOnlyChange(t *testing.T) { + env := kittest.Env(t, kittest.Pages{ + FilesAPI.FileURL("6c68656caafdff65a30943fe186a1800b9f35bbc"): "testdata/dropbox-files-6c68656c.stone", + FilesAPI.FileURL("a4fc0169eda7dc981facd4208ebc7b66a4db00ee"): "testdata/dropbox-files-a4fc0169.stone", + }) + got := kittest.Versions(t, env, FilesAPI, + plugin.Version{ID: "2026-05-12", Ref: "6c68656caafdff65a30943fe186a1800b9f35bbc"}, + plugin.Version{ID: "2026-06-07", Ref: "a4fc0169eda7dc981facd4208ebc7b66a4db00ee"}) + if len(got) != 0 { + t.Errorf("%d events, want 0: this commit only touches comments", len(got)) + } +} + +// The pinned rename test: a real commit (2018-08-14) where Dropbox +// changed its own Stone spelling for five routes (copy_v2 -> copy:2, +// create_folder_v2 -> create_folder:2, delete_v2 -> delete:2, +// move_v2 -> move:2, upload_session/append_v2 -> upload_session/append:2) +// with no change to the real HTTP call either spelling answers to. Found by +// walking the full real history outside this test suite: a naive name +// diff reports all five as a route removed and a route added, which is +// wrong, so this is pinned here to keep it that way. get_temporary_upload_link, +// genuinely new in the same commit, must still come through as added. +func TestFilesAPIDropsARenamedSpelling(t *testing.T) { + env := kittest.Env(t, kittest.Pages{ + FilesAPI.FileURL("222ba8c06cbf005e38f63c253b44b60d82200f17"): "testdata/dropbox-files-222ba8c0.stone", + FilesAPI.FileURL("ff540e4a194313d394ca506f6a6aefa2f34bf968"): "testdata/dropbox-files-ff540e4a.stone", + FilesAPI.ListingURL("222ba8c06cbf005e38f63c253b44b60d82200f17"): "testdata/dropbox-spec-listing-222ba8c0.json", + }) + got := kittest.Versions(t, env, FilesAPI, + plugin.Version{ID: "2018-05-17", Ref: "222ba8c06cbf005e38f63c253b44b60d82200f17"}, + plugin.Version{ID: "2018-08-14", Ref: "ff540e4a194313d394ca506f6a6aefa2f34bf968"}) + if len(got) != 1 { + t.Fatalf("%d events, want 1 (only get_temporary_upload_link added): %+v", len(got), got) + } + if got[0].Change != "added" || got[0].Subject.Operation != "POST /2/files/get_temporary_upload_link" { + t.Errorf("got %+v", got[0]) + } +} + +// A route's trailing :N (search:2, copy_batch/check:2) maps to the real +// HTTP path's _vN (search_v2, copy_batch/check_v2), never the Stone +// spelling: checked against the published openapi/openapi.yaml on +// 2026-11-21. +func TestFilesAPIOperationMapsTheVSuffix(t *testing.T) { + for name, want := range map[string]string{ + "search": "POST /2/files/search", + "search:2": "POST /2/files/search_v2", + "copy_batch/check:2": "POST /2/files/copy_batch/check_v2", + "properties/remove": "POST /2/files/properties/remove", + } { + if got := FilesAPI.Operation(name); got != want { + t.Errorf("Operation(%q) = %q, want %q", name, got, want) + } + } +} diff --git a/providers/dropbox/provider.go b/providers/dropbox/provider.go new file mode 100644 index 0000000..8c8bd48 --- /dev/null +++ b/providers/dropbox/provider.go @@ -0,0 +1,60 @@ +// Package dropbox is what patch-it reads for Dropbox: every source, registered +// below with its metadata, each read by its kind (kinds/). README.md +// says why each source and what it reads. +package dropbox + +import ( + "regexp" + + "github.com/patch-it-dev/patch-it-plugins/core/plugin" + "github.com/patch-it-dev/patch-it-plugins/kinds/apisurface" + "github.com/patch-it-dev/patch-it-plugins/kinds/catalog" +) + +func init() { + plugin.RegisterProvider(plugin.Provider{ + ID: "dropbox", Name: "Dropbox", Category: plugin.CategoryStorage, Homepage: "https://www.dropbox.com", + Sources: []plugin.Source{ + { + ID: "files-api", Layer: plugin.LayerAPI, + Watches: "Routes removed or added in Dropbox's own API spec for the files namespace " + + "(upload, download, copy, move, delete, search, thumbnails, revisions, file properties, tags, locks), from " + + "dropbox-api-spec's files.stone, read at each commit that changed it", + URLs: []string{"https://github.com/dropbox/dropbox-api-spec/blob/main/files.stone"}, + Packages: []string{"pypi:dropbox", "npm:dropbox"}, + Plugin: FilesAPI, + }, + apisurface.PyPI(PythonSurface, plugin.LayerSDK, "https://github.com/dropbox/dropbox-sdk-python"), + }, + }) +} + +// v2Suffix turns a Stone route name's trailing version marker (":2") into +// the suffix the real HTTP path uses instead ("_v2"): checked against the +// published spec on 2026-11-21, every `name:N` route is `name_vN` at +// `/2//name_vN` (`search:2` is `/2/files/search_v2`, +// `copy_batch/check:2` is `/2/files/copy_batch/check_v2`), never `name:N` +// verbatim. +var v2Suffix = regexp.MustCompile(`:(\d+)$`) + +// FilesAPI is the files namespace of Dropbox's own API Spec +// (dropbox/dropbox-api-spec, files.stone): the Stone IDL file every +// official Dropbox SDK (Python, JS, .NET, Java, Swift, Objective-C) is +// generated from. Every route is a POST (Dropbox's v2 API is RPC-style, +// confirmed against the generated openapi/openapi.yaml on 2026-11-21: every +// one of its 267 paths is a POST), to /2/files/, with a Stone +// `:N` suffix read as `_vN` (see v2Suffix). +var FilesAPI = catalog.Routes{ + API: "dropbox/files-api", Vendor: "Dropbox", + Repo: "dropbox/dropbox-api-spec", Path: "files.stone", + Operation: func(name string) string { + return "POST /2/files/" + v2Suffix.ReplaceAllString(name, "_v$1") + }, +} + +// PythonSurface is dropbox-sdk-python's public API (PyPI package "dropbox", +// top-level import "dropbox"), the whole package: mostly generated by Stone +// from every namespace of the spec, so it sees the Python names and +// parameters of every route, where FilesAPI sees only the files namespace's +// route names. +var PythonSurface = apisurface.Package{ID: "dropbox/python-surface", Name: "dropbox", Ecosystem: "pypi", Module: "dropbox"} diff --git a/providers/dropbox/python_surface_test.go b/providers/dropbox/python_surface_test.go new file mode 100644 index 0000000..6734389 --- /dev/null +++ b/providers/dropbox/python_surface_test.go @@ -0,0 +1,19 @@ +package dropbox + +import ( + "testing" + + "github.com/patch-it-dev/patch-it-plugins/kinds/apisurface/apisurfacetest" +) + +// dropbox 12.2.4 removed Dropbox.sharing_remove_file_member, which 12.2.3 +// still had (already warning "remove_file_member is deprecated."); its +// route is gone from sharing.stone too, remove_file_member_2 left in its +// place. The sharing namespace isn't one files-api reads. The drop pair, +// 12.2.0 to 12.2.1, reformats every method signature in base.py and +// changes none of them. +func TestPythonSurface(t *testing.T) { + apisurfacetest.PyPI(t, apisurfacetest.Case{Package: PythonSurface, Golden: [2]string{"12.2.3", "12.2.4"}, Want: []string{ + "removed_symbol base.DropboxBase.sharing_remove_file_member ", + }, Drop: [2]string{"12.2.0", "12.2.1"}}) +} diff --git a/providers/dropbox/testdata/README.md b/providers/dropbox/testdata/README.md new file mode 100644 index 0000000..60a968c --- /dev/null +++ b/providers/dropbox/testdata/README.md @@ -0,0 +1,44 @@ +# Dropbox: saved copies and goldens + +Real copies of what Dropbox publishes, read by this folder's tests instead of the network: each row says where it was fetched, when, its license and a quote. The golden files under `golden/` are every event the tests must store; `go test ./providers/dropbox -update` rewrites them after an intended change, and the PR says why the new output is right. + +## Saved `files.stone` commits + +Each file is the real commit's `files.stone`, trimmed to its `namespace` line and every `^route ` declaration line, each copied byte for byte in the file's own order; everything else (structs, unions, docstrings, route attributes) is left out, since `Routes` reads only the declaration lines. Checked that the trimmed copy's route names match the full file's exactly, for every commit saved (66 routes at `c8364404`, 67 at `6c68656c` and `a4fc0169`, 50 at `222ba8c0`, 51 at `ff540e4a`). + +| File | URL | Committer date | License | Quote | +|---|---|---|---|---| +| `dropbox-files-c8364404.stone` | https://raw.githubusercontent.com/dropbox/dropbox-api-spec/c8364404953d875801d496a81f786c5545f78223/files.stone | 2023-04-26 | MIT (dropbox/dropbox-api-spec `LICENSE`): excerpt for testing, © Dropbox, Inc.; maintainers, please confirm | `route properties/remove(file_properties.RemovePropertiesArg, Void, file_properties.RemovePropertiesError) deprecated` | +| `dropbox-files-6c68656c.stone` | https://raw.githubusercontent.com/dropbox/dropbox-api-spec/6c68656caafdff65a30943fe186a1800b9f35bbc/files.stone | 2026-05-12 | MIT: excerpt for testing, © Dropbox, Inc.; maintainers, please confirm | `route tags/add (AddTagArg, Void, AddTagError)` (moved here from `file_tagging.stone`, which this commit deletes; `properties/remove` and its two siblings are gone) | +| `dropbox-files-a4fc0169.stone` | https://raw.githubusercontent.com/dropbox/dropbox-api-spec/a4fc0169eda7dc981facd4208ebc7b66a4db00ee/files.stone | 2026-06-07 | MIT: excerpt for testing, © Dropbox, Inc.; maintainers, please confirm | same 67 route names as `dropbox-files-6c68656c.stone`: the drop test | +| `dropbox-files-222ba8c0.stone` | https://raw.githubusercontent.com/dropbox/dropbox-api-spec/222ba8c06cbf005e38f63c253b44b60d82200f17/files.stone | 2018-05-17 | MIT: excerpt for testing, © Dropbox, Inc.; maintainers, please confirm | `route copy_v2 (RelocationArg, RelocationResult, RelocationError)` | +| `dropbox-files-ff540e4a.stone` | https://raw.githubusercontent.com/dropbox/dropbox-api-spec/ff540e4a194313d394ca506f6a6aefa2f34bf968/files.stone | 2018-08-14 | MIT: excerpt for testing, © Dropbox, Inc.; maintainers, please confirm | `route copy:2 (RelocationArg, RelocationResult, RelocationError)`: same operation as `copy_v2` above, a renamed spelling, not a removal — the rename test | + +## Saved directory listings and other files of the namespace + +`Routes` checks a name that looks removed or added against the other `.stone` files declaring the same namespace at that commit, so the pairs with a change need GitHub's listing of the repo's top directory at the commit they look at. + +| File | URL | Recorded | Trimmed to | Quote | +|---|---|---|---|---| +| `dropbox-spec-listing-c8364404.json` | https://api.github.com/repos/dropbox/dropbox-api-spec/contents?ref=c8364404953d875801d496a81f786c5545f78223 | 2026-11-22 | 2 of 46 entries, `name`, `path`, `type`: `files.stone` and `file_tagging.stone`, the only two of its 40 `.stone` files declaring `namespace files` (checked against every one) | | +| `dropbox-spec-listing-6c68656c.json` | https://api.github.com/repos/dropbox/dropbox-api-spec/contents?ref=6c68656caafdff65a30943fe186a1800b9f35bbc | 2026-11-22 | 1 of 29: `files.stone`, the only one of its 23 `.stone` files declaring `namespace files` | | +| `dropbox-spec-listing-222ba8c0.json` | https://api.github.com/repos/dropbox/dropbox-api-spec/contents?ref=222ba8c06cbf005e38f63c253b44b60d82200f17 | 2026-11-22 | 1 of 30: `files.stone`, the only one of its 29 `.stone` files declaring `namespace files` | | +| `dropbox-file_tagging-c8364404.stone` | https://raw.githubusercontent.com/dropbox/dropbox-api-spec/c8364404953d875801d496a81f786c5545f78223/file_tagging.stone | 2026-11-22 | its `namespace` line and its 3 `^route ` lines, byte for byte; MIT, as above | `namespace files`, `route tags/add(AddTagArg, Void, AddTagError)`: why the golden pair's `tags/*` in `files.stone` aren't additions | + +The golden file, `golden/dropbox-files-api.json`, is every event `TestFilesAPIGolden` stores from `dropbox-files-c8364404.stone` and `dropbox-files-6c68656c.stone`, checked against the listings and the `file_tagging.stone` copy above. + +The rename pair (`dropbox-files-222ba8c0.stone`, `dropbox-files-ff540e4a.stone`) was found by walking the plugin against the real, untrimmed history of `files.stone` outside this test suite (all 69 real commits, not just the saved ones here): a naive name diff read 5 real routes as removed and re-added under Dropbox's newer `:N` spelling, which is why `Routes.Extract` matches a removed and an added name by the `Operation` they compute to, not by name, before deciding either is real. + +## Saved PyPI releases (`python-surface`) + +Each `.trimmed.whl` is the real release's wheel (the only wheel each release has), trimmed to `dropbox/base.py`, copied byte for byte: every method the tests compare is in it. The `pypi-dropbox-*.json` files are PyPI's own metadata, trimmed to the fields the adapter reads, and the excerpt's `releases` to the four saved versions. Checked 2026-11-22. + +| File | URL | License | Quote | +|---|---|---|---| +| `dropbox-12.2.0-py3-none-any.trimmed.whl` | https://files.pythonhosted.org/packages/03/52/a9deb96572656bd773955be3b86e58ce7488a883cc8b56ae09f3f07e6437/dropbox-12.2.0-py3-none-any.whl | MIT (dropbox/dropbox-sdk-python `LICENSE`) | the drop test's older side: 169 of `base.py`'s 180 methods have their signature split one parameter per line | +| `dropbox-12.2.1-py3-none-any.trimmed.whl` | https://files.pythonhosted.org/packages/f4/8d/4dfdb50aa7378cfe8be2820ed375d840340a9dfb4971e76c780883c860d5/dropbox-12.2.1-py3-none-any.whl | MIT (dropbox/dropbox-sdk-python `LICENSE`) | the drop test's newer side: the same 180 methods, 34 of them split; no name or parameter changed | +| `dropbox-12.2.3-py3-none-any.trimmed.whl` | https://files.pythonhosted.org/packages/de/01/c8cb45346fd2df249d6f6a311ec25cd84c37c8f549f5f204d09586a1debf/dropbox-12.2.3-py3-none-any.whl | MIT (dropbox/dropbox-sdk-python `LICENSE`) | `def sharing_remove_file_member(self, file, member)` (line 6054), already warning `"remove_file_member is deprecated."` | +| `dropbox-12.2.4-py3-none-any.trimmed.whl` | https://files.pythonhosted.org/packages/3e/c3/442b4dd1360c5d4a3b146de0732949c71527fd5282ef7a1e7711cd27037d/dropbox-12.2.4-py3-none-any.whl | MIT (dropbox/dropbox-sdk-python `LICENSE`) | `sharing_remove_file_member` gone; `sharing_remove_file_member_2` still there | +| `pypi-dropbox-excerpt.json`, `pypi-dropbox-12.2.0.json`, `pypi-dropbox-12.2.1.json`, `pypi-dropbox-12.2.3.json`, `pypi-dropbox-12.2.4.json` | https://pypi.org/pypi/dropbox/json, https://pypi.org/pypi/dropbox/<version>/json | PyPI metadata | | + +The golden file, `golden/dropbox-python-surface.json`, is every event `TestPythonSurface` stores from 12.2.3 → 12.2.4 (one, the removal; with only `base.py` saved, nothing is added). diff --git a/providers/dropbox/testdata/dropbox-file_tagging-c8364404.stone b/providers/dropbox/testdata/dropbox-file_tagging-c8364404.stone new file mode 100644 index 0000000..dd9d174 --- /dev/null +++ b/providers/dropbox/testdata/dropbox-file_tagging-c8364404.stone @@ -0,0 +1,4 @@ +namespace files +route tags/add(AddTagArg, Void, AddTagError) +route tags/remove(RemoveTagArg, Void, RemoveTagError) +route tags/get(GetTagsArg, GetTagsResult, BaseTagError) diff --git a/providers/dropbox/testdata/dropbox-files-222ba8c0.stone b/providers/dropbox/testdata/dropbox-files-222ba8c0.stone new file mode 100644 index 0000000..275b5e1 --- /dev/null +++ b/providers/dropbox/testdata/dropbox-files-222ba8c0.stone @@ -0,0 +1,51 @@ +namespace files +route get_metadata (GetMetadataArg, Metadata, GetMetadataError) +route list_folder/longpoll (ListFolderLongpollArg, ListFolderLongpollResult, ListFolderLongpollError) +route list_folder (ListFolderArg, ListFolderResult, ListFolderError) +route list_folder/continue (ListFolderContinueArg, ListFolderResult, ListFolderContinueError) +route list_folder/get_latest_cursor (ListFolderArg, ListFolderGetLatestCursorResult, ListFolderError) +route download (DownloadArg, FileMetadata, DownloadError) +route download_zip (DownloadZipArg, DownloadZipResult, DownloadZipError) +route upload_session/start (UploadSessionStartArg, UploadSessionStartResult, Void) +route upload_session/append_v2 (UploadSessionAppendArg, Void, UploadSessionLookupError) +route upload_session/append (UploadSessionCursor, Void, UploadSessionLookupError) deprecated by upload_session/append_v2 +route upload_session/finish (UploadSessionFinishArg, FileMetadata, UploadSessionFinishError) +route upload (CommitInfo, FileMetadata, UploadError) +route upload_session/finish_batch (UploadSessionFinishBatchArg, UploadSessionFinishBatchLaunch, Void) +route upload_session/finish_batch/check(async.PollArg, UploadSessionFinishBatchJobStatus, async.PollError) +route search (SearchArg, SearchResult, SearchError) +route create_folder_v2 (CreateFolderArg, CreateFolderResult, CreateFolderError) +route create_folder (CreateFolderArg, FolderMetadata, CreateFolderError) deprecated by create_folder_v2 +route create_folder_batch (CreateFolderBatchArg, CreateFolderBatchLaunch, Void) +route create_folder_batch/check (async.PollArg, CreateFolderBatchJobStatus, async.PollError) +route delete_v2 (DeleteArg, DeleteResult, DeleteError) +route delete (DeleteArg, Metadata, DeleteError) deprecated by delete_v2 +route delete_batch (DeleteBatchArg, DeleteBatchLaunch, Void) +route delete_batch/check (async.PollArg, DeleteBatchJobStatus, async.PollError) +route permanently_delete (DeleteArg, Void, DeleteError) +route copy_v2 (RelocationArg, RelocationResult, RelocationError) +route copy (RelocationArg, Metadata, RelocationError) deprecated by copy_v2 +route copy_batch (RelocationBatchArg, RelocationBatchLaunch, Void) +route copy_batch/check(async.PollArg, RelocationBatchJobStatus, async.PollError) +route move_v2 (RelocationArg, RelocationResult, RelocationError) +route move (RelocationArg, Metadata, RelocationError) deprecated by move_v2 +route move_batch (RelocationBatchArg, RelocationBatchLaunch, Void) +route move_batch/check(async.PollArg, RelocationBatchJobStatus, async.PollError) +route get_thumbnail(ThumbnailArg, FileMetadata, ThumbnailError) +route get_thumbnail_batch(GetThumbnailBatchArg, GetThumbnailBatchResult, GetThumbnailBatchError) +route get_preview(PreviewArg, FileMetadata, PreviewError) +route list_revisions(ListRevisionsArg, ListRevisionsResult, ListRevisionsError) +route restore(RestoreArg, FileMetadata, RestoreError) +route get_temporary_link(GetTemporaryLinkArg, GetTemporaryLinkResult, GetTemporaryLinkError) +route copy_reference/get(GetCopyReferenceArg, GetCopyReferenceResult, GetCopyReferenceError) +route copy_reference/save(SaveCopyReferenceArg, SaveCopyReferenceResult, SaveCopyReferenceError) +route save_url(SaveUrlArg, SaveUrlResult, SaveUrlError) +route save_url/check_job_status(async.PollArg, SaveUrlJobStatus, async.PollError) +route alpha/get_metadata (AlphaGetMetadataArg, Metadata, AlphaGetMetadataError) deprecated by get_metadata +route alpha/upload (CommitInfoWithProperties, FileMetadata, UploadErrorWithProperties) deprecated by alpha/upload +route properties/add(file_properties.AddPropertiesArg, Void, file_properties.AddPropertiesError) deprecated +route properties/overwrite(file_properties.OverwritePropertyGroupArg, Void, file_properties.InvalidPropertyGroupError) deprecated +route properties/update(file_properties.UpdatePropertiesArg, Void, file_properties.UpdatePropertiesError) deprecated +route properties/remove(file_properties.RemovePropertiesArg, Void, file_properties.RemovePropertiesError) deprecated +route properties/template/get(file_properties.GetTemplateArg, file_properties.GetTemplateResult, file_properties.TemplateError) deprecated +route properties/template/list(Void, file_properties.ListTemplateResult, file_properties.TemplateError) deprecated diff --git a/providers/dropbox/testdata/dropbox-files-6c68656c.stone b/providers/dropbox/testdata/dropbox-files-6c68656c.stone new file mode 100644 index 0000000..51945c3 --- /dev/null +++ b/providers/dropbox/testdata/dropbox-files-6c68656c.stone @@ -0,0 +1,68 @@ +namespace files +route search (SearchArg, SearchResult, SearchError) deprecated by search:2 +route search:2 (SearchV2Arg, SearchV2Result, SearchError) +route search/continue:2 (SearchV2ContinueArg, SearchV2Result, SearchError) +route tags/add (AddTagArg, Void, AddTagError) +route tags/remove (RemoveTagArg, Void, RemoveTagError) +route tags/get (GetTagsArg, GetTagsResult, BaseTagError) +route upload_session/start_batch (UploadSessionStartBatchArg, UploadSessionStartBatchResult, Void) +route create_folder (CreateFolderArg, FolderMetadata, CreateFolderError) deprecated +route create_folder:2 (CreateFolderArg, CreateFolderResult, CreateFolderError) +route delete (DeleteArg, Metadata, DeleteError) deprecated +route delete:2 (DeleteArg, DeleteResult, DeleteError) +route move (RelocationArg, Metadata, RelocationError) deprecated +route move:2 (RelocationArg, RelocationResult, RelocationError) +route export (ExportArg, ExportResult, ExportError) +route paper/create (PaperCreateArg, PaperCreateResult, PaperCreateError) +route paper/update (PaperUpdateArg, PaperUpdateResult, PaperUpdateError) +route download (DownloadArg, FileMetadata, DownloadError) +route copy_reference/get (GetCopyReferenceArg, GetCopyReferenceResult, GetCopyReferenceError) +route copy_reference/save (SaveCopyReferenceArg, SaveCopyReferenceResult, SaveCopyReferenceError) +route download_zip (DownloadZipArg, DownloadZipResult, DownloadZipError) +route get_preview (PreviewArg, FileMetadata, PreviewError) +route get_thumbnail (ThumbnailArg, FileMetadata, ThumbnailError) +route get_thumbnail_batch (GetThumbnailBatchArg, GetThumbnailBatchResult, GetThumbnailBatchError) +route get_thumbnail:2 (ThumbnailV2Arg, PreviewResult, ThumbnailV2Error) +route create_folder_batch (CreateFolderBatchArg, CreateFolderBatchLaunch, Void) +route create_folder_batch/check (async.PollArg, CreateFolderBatchJobStatus, async.PollError) +route delete_batch (DeleteBatchArg, DeleteBatchLaunch, Void) +route delete_batch/check (async.PollArg, DeleteBatchJobStatus, async.PollError) +route permanently_delete (DeleteArg, Void, DeleteError) +route copy (RelocationArg, Metadata, RelocationError) deprecated +route copy:2 (RelocationArg, RelocationResult, RelocationError) +route copy_batch (RelocationBatchArg, RelocationBatchLaunch, Void) deprecated +route copy_batch:2 (CopyBatchArg, RelocationBatchV2Launch, Void) +route copy_batch/check (async.PollArg, RelocationBatchJobStatus, async.PollError) deprecated +route copy_batch/check:2 (async.PollArg, RelocationBatchV2JobStatus, async.PollError) +route move_batch (RelocationBatchArg, RelocationBatchLaunch, Void) deprecated +route move_batch:2 (MoveBatchArg, RelocationBatchV2Launch, Void) +route move_batch/check (async.PollArg, RelocationBatchJobStatus, async.PollError) deprecated +route move_batch/check:2 (async.PollArg, RelocationBatchV2JobStatus, async.PollError) +route list_revisions (ListRevisionsArg, ListRevisionsResult, ListRevisionsError) +route restore (RestoreArg, FileMetadata, RestoreError) +route get_metadata (GetMetadataArg, Metadata, GetMetadataError) +route list_folder (ListFolderArg, ListFolderResult, ListFolderError) +route list_folder/continue (ListFolderContinueArg, ListFolderResult, ListFolderContinueError) +route list_folder/get_latest_cursor (ListFolderArg, ListFolderGetLatestCursorResult, ListFolderError) +route list_folder/longpoll (ListFolderLongpollArg, ListFolderLongpollResult, ListFolderLongpollError) +route alpha/get_metadata (AlphaGetMetadataArg, Metadata, AlphaGetMetadataError) deprecated +route upload_session/finish_batch (UploadSessionFinishBatchArg, UploadSessionFinishBatchLaunch, Void) deprecated +route upload_session/finish_batch:2 (UploadSessionFinishBatchArg, UploadSessionFinishBatchResult, Void) +route upload_session/finish_batch/check (async.PollArg, UploadSessionFinishBatchJobStatus, async.PollError) +route get_temporary_link (GetTemporaryLinkArg, GetTemporaryLinkResult, GetTemporaryLinkError) +route properties/add (file_properties.AddPropertiesArg, Void, file_properties.AddPropertiesError) deprecated +route properties/update (file_properties.UpdatePropertiesArg, Void, file_properties.UpdatePropertiesError) deprecated +route properties/overwrite (file_properties.OverwritePropertyGroupArg, Void, file_properties.InvalidPropertyGroupError) deprecated +route save_url (SaveUrlArg, SaveUrlResult, SaveUrlError) +route save_url/check_job_status (async.PollArg, SaveUrlJobStatus, async.PollError) +route upload (UploadArg, FileMetadata, UploadError) +route upload_session/start (UploadSessionStartArg, UploadSessionStartResult, UploadSessionStartError) +route upload_session/append (UploadSessionCursor, Void, UploadSessionAppendError) deprecated +route upload_session/append:2 (UploadSessionAppendArg, Void, UploadSessionAppendError) +route upload_session/append_batch (UploadSessionAppendBatchArg, UploadSessionAppendBatchResult, UploadSessionAppendBatchError) +route upload_session/finish (UploadSessionFinishArg, FileMetadata, UploadSessionFinishError) +route alpha/upload (UploadArg, FileMetadata, UploadError) deprecated +route get_temporary_upload_link (GetTemporaryUploadLinkArg, GetTemporaryUploadLinkResult, Void) +route lock_file_batch (LockFileBatchArg, LockFileBatchResult, LockFileError) +route unlock_file_batch (UnlockFileBatchArg, LockFileBatchResult, LockFileError) +route get_file_lock_batch (LockFileBatchArg, LockFileBatchResult, LockFileError) diff --git a/providers/dropbox/testdata/dropbox-files-a4fc0169.stone b/providers/dropbox/testdata/dropbox-files-a4fc0169.stone new file mode 100644 index 0000000..3521259 --- /dev/null +++ b/providers/dropbox/testdata/dropbox-files-a4fc0169.stone @@ -0,0 +1,68 @@ +namespace files +route search:2 (SearchV2Arg, SearchV2Result, SearchError) +route search/continue:2 (SearchV2ContinueArg, SearchV2Result, SearchError) +route tags/add (AddTagArg, Void, AddTagError) +route tags/remove (RemoveTagArg, Void, RemoveTagError) +route tags/get (GetTagsArg, GetTagsResult, BaseTagError) +route create_folder_batch (CreateFolderBatchArg, CreateFolderBatchLaunch, Void) +route create_folder_batch/check (async.PollArg, CreateFolderBatchJobStatus, async.PollError) +route delete_batch (DeleteBatchArg, DeleteBatchLaunch, Void) +route delete_batch/check (async.PollArg, DeleteBatchJobStatus, async.PollError) +route permanently_delete (DeleteArg, Void, DeleteError) +route copy (RelocationArg, Metadata, RelocationError) deprecated +route copy:2 (RelocationArg, RelocationResult, RelocationError) +route copy_batch (RelocationBatchArg, RelocationBatchLaunch, Void) deprecated +route copy_batch:2 (CopyBatchArg, RelocationBatchV2Launch, Void) +route copy_batch/check (async.PollArg, RelocationBatchJobStatus, async.PollError) deprecated +route copy_batch/check:2 (async.PollArg, RelocationBatchV2JobStatus, async.PollError) +route move_batch (RelocationBatchArg, RelocationBatchLaunch, Void) deprecated +route move_batch:2 (MoveBatchArg, RelocationBatchV2Launch, Void) +route move_batch/check (async.PollArg, RelocationBatchJobStatus, async.PollError) deprecated +route move_batch/check:2 (async.PollArg, RelocationBatchV2JobStatus, async.PollError) +route create_folder (CreateFolderArg, FolderMetadata, CreateFolderError) deprecated +route create_folder:2 (CreateFolderArg, CreateFolderResult, CreateFolderError) +route delete (DeleteArg, Metadata, DeleteError) deprecated +route delete:2 (DeleteArg, DeleteResult, DeleteError) +route move (RelocationArg, Metadata, RelocationError) deprecated +route move:2 (RelocationArg, RelocationResult, RelocationError) +route get_temporary_link (GetTemporaryLinkArg, GetTemporaryLinkResult, GetTemporaryLinkError) +route copy_reference/get (GetCopyReferenceArg, GetCopyReferenceResult, GetCopyReferenceError) +route copy_reference/save (SaveCopyReferenceArg, SaveCopyReferenceResult, SaveCopyReferenceError) +route download (DownloadArg, FileMetadata, DownloadError) +route download_zip (DownloadZipArg, DownloadZipResult, DownloadZipError) +route export (ExportArg, ExportResult, ExportError) +route get_temporary_upload_link (GetTemporaryUploadLinkArg, GetTemporaryUploadLinkResult, Void) +route lock_file_batch (LockFileBatchArg, LockFileBatchResult, LockFileError) +route unlock_file_batch (UnlockFileBatchArg, LockFileBatchResult, LockFileError) +route get_file_lock_batch (LockFileBatchArg, LockFileBatchResult, LockFileError) +route get_metadata (GetMetadataArg, Metadata, GetMetadataError) +route list_folder (ListFolderArg, ListFolderResult, ListFolderError) +route list_folder/continue (ListFolderContinueArg, ListFolderResult, ListFolderContinueError) +route list_folder/get_latest_cursor (ListFolderArg, ListFolderGetLatestCursorResult, ListFolderError) +route list_folder/longpoll (ListFolderLongpollArg, ListFolderLongpollResult, ListFolderLongpollError) +route alpha/get_metadata (AlphaGetMetadataArg, Metadata, AlphaGetMetadataError) deprecated +route paper/create (PaperCreateArg, PaperCreateResult, PaperCreateError) +route paper/update (PaperUpdateArg, PaperUpdateResult, PaperUpdateError) +route get_preview (PreviewArg, FileMetadata, PreviewError) +route get_thumbnail (ThumbnailArg, FileMetadata, ThumbnailError) +route get_thumbnail_batch (GetThumbnailBatchArg, GetThumbnailBatchResult, GetThumbnailBatchError) +route get_thumbnail:2 (ThumbnailV2Arg, PreviewResult, ThumbnailV2Error) +route properties/add (file_properties.AddPropertiesArg, Void, file_properties.AddPropertiesError) deprecated +route properties/update (file_properties.UpdatePropertiesArg, Void, file_properties.UpdatePropertiesError) deprecated +route properties/overwrite (file_properties.OverwritePropertyGroupArg, Void, file_properties.InvalidPropertyGroupError) deprecated +route save_url (SaveUrlArg, SaveUrlResult, SaveUrlError) +route save_url/check_job_status (async.PollArg, SaveUrlJobStatus, async.PollError) +route upload (UploadArg, FileMetadata, UploadError) +route upload_session/start (UploadSessionStartArg, UploadSessionStartResult, UploadSessionStartError) +route upload_session/append (UploadSessionCursor, Void, UploadSessionAppendError) deprecated +route upload_session/append:2 (UploadSessionAppendArg, Void, UploadSessionAppendError) +route upload_session/append_batch (UploadSessionAppendBatchArg, UploadSessionAppendBatchResult, UploadSessionAppendBatchError) +route upload_session/finish (UploadSessionFinishArg, FileMetadata, UploadSessionFinishError) +route alpha/upload (UploadArg, FileMetadata, UploadError) deprecated +route upload_session/start_batch (UploadSessionStartBatchArg, UploadSessionStartBatchResult, Void) +route upload_session/finish_batch (UploadSessionFinishBatchArg, UploadSessionFinishBatchLaunch, Void) deprecated +route upload_session/finish_batch:2 (UploadSessionFinishBatchArg, UploadSessionFinishBatchResult, Void) +route upload_session/finish_batch/check (async.PollArg, UploadSessionFinishBatchJobStatus, async.PollError) +route list_revisions (ListRevisionsArg, ListRevisionsResult, ListRevisionsError) +route restore (RestoreArg, FileMetadata, RestoreError) +route search (SearchArg, SearchResult, SearchError) deprecated diff --git a/providers/dropbox/testdata/dropbox-files-c8364404.stone b/providers/dropbox/testdata/dropbox-files-c8364404.stone new file mode 100644 index 0000000..2d4786d --- /dev/null +++ b/providers/dropbox/testdata/dropbox-files-c8364404.stone @@ -0,0 +1,67 @@ +namespace files +route get_metadata (GetMetadataArg, Metadata, GetMetadataError) +route list_folder/longpoll (ListFolderLongpollArg, ListFolderLongpollResult, ListFolderLongpollError) +route list_folder (ListFolderArg, ListFolderResult, ListFolderError) +route list_folder/continue (ListFolderContinueArg, ListFolderResult, ListFolderContinueError) +route list_folder/get_latest_cursor (ListFolderArg, ListFolderGetLatestCursorResult, ListFolderError) +route download (DownloadArg, FileMetadata, DownloadError) +route download_zip (DownloadZipArg, DownloadZipResult, DownloadZipError) +route export (ExportArg, ExportResult, ExportError) +route upload_session/start_batch (UploadSessionStartBatchArg, UploadSessionStartBatchResult, Void) +route upload_session/start (UploadSessionStartArg, UploadSessionStartResult, UploadSessionStartError) +route upload_session/append:2 (UploadSessionAppendArg, Void, UploadSessionAppendError) +route upload_session/append (UploadSessionCursor, Void, UploadSessionAppendError) deprecated by upload_session/append:2 +route upload_session/finish (UploadSessionFinishArg, FileMetadata, UploadSessionFinishError) +route upload (UploadArg, FileMetadata, UploadError) +route upload_session/finish_batch (UploadSessionFinishBatchArg, UploadSessionFinishBatchLaunch, Void) deprecated by upload_session/finish_batch:2 +route upload_session/finish_batch:2 (UploadSessionFinishBatchArg, UploadSessionFinishBatchResult, Void) +route upload_session/finish_batch/check(async.PollArg, UploadSessionFinishBatchJobStatus, async.PollError) +route search (SearchArg, SearchResult, SearchError) deprecated by search:2 +route search:2 (SearchV2Arg, SearchV2Result, SearchError) +route search/continue:2 (SearchV2ContinueArg, SearchV2Result, SearchError) +route create_folder:2 (CreateFolderArg, CreateFolderResult, CreateFolderError) +route create_folder (CreateFolderArg, FolderMetadata, CreateFolderError) deprecated by create_folder:2 +route create_folder_batch (CreateFolderBatchArg, CreateFolderBatchLaunch, Void) +route create_folder_batch/check (async.PollArg, CreateFolderBatchJobStatus, async.PollError) +route delete:2 (DeleteArg, DeleteResult, DeleteError) +route delete (DeleteArg, Metadata, DeleteError) deprecated by delete:2 +route delete_batch (DeleteBatchArg, DeleteBatchLaunch, Void) +route delete_batch/check (async.PollArg, DeleteBatchJobStatus, async.PollError) +route permanently_delete (DeleteArg, Void, DeleteError) +route copy:2 (RelocationArg, RelocationResult, RelocationError) +route copy (RelocationArg, Metadata, RelocationError) deprecated by copy:2 +route copy_batch:2 (CopyBatchArg, RelocationBatchV2Launch, Void) +route copy_batch/check:2 (async.PollArg, RelocationBatchV2JobStatus, async.PollError) +route copy_batch (RelocationBatchArg, RelocationBatchLaunch, Void) deprecated by copy_batch:2 +route copy_batch/check (async.PollArg, RelocationBatchJobStatus, async.PollError) deprecated by copy_batch/check:2 +route move:2 (RelocationArg, RelocationResult, RelocationError) +route move (RelocationArg, Metadata, RelocationError) deprecated by move:2 +route move_batch:2(MoveBatchArg, RelocationBatchV2Launch, Void) +route move_batch/check:2(async.PollArg, RelocationBatchV2JobStatus, async.PollError) +route move_batch (RelocationBatchArg, RelocationBatchLaunch, Void) deprecated by move_batch:2 +route move_batch/check(async.PollArg, RelocationBatchJobStatus, async.PollError) deprecated by move_batch/check:2 +route get_thumbnail(ThumbnailArg, FileMetadata, ThumbnailError) +route get_thumbnail_batch(GetThumbnailBatchArg, GetThumbnailBatchResult, GetThumbnailBatchError) +route get_thumbnail:2(ThumbnailV2Arg, PreviewResult, ThumbnailV2Error) +route get_preview(PreviewArg, FileMetadata, PreviewError) +route list_revisions(ListRevisionsArg, ListRevisionsResult, ListRevisionsError) +route restore(RestoreArg, FileMetadata, RestoreError) +route get_temporary_link(GetTemporaryLinkArg, GetTemporaryLinkResult, GetTemporaryLinkError) +route get_temporary_upload_link(GetTemporaryUploadLinkArg, GetTemporaryUploadLinkResult, Void) +route copy_reference/get(GetCopyReferenceArg, GetCopyReferenceResult, GetCopyReferenceError) +route copy_reference/save(SaveCopyReferenceArg, SaveCopyReferenceResult, SaveCopyReferenceError) +route save_url(SaveUrlArg, SaveUrlResult, SaveUrlError) +route save_url/check_job_status(async.PollArg, SaveUrlJobStatus, async.PollError) +route alpha/get_metadata (AlphaGetMetadataArg, Metadata, AlphaGetMetadataError) deprecated by get_metadata +route alpha/upload (UploadArg, FileMetadata, UploadError) deprecated by upload +route properties/add(file_properties.AddPropertiesArg, Void, file_properties.AddPropertiesError) deprecated +route properties/overwrite(file_properties.OverwritePropertyGroupArg, Void, file_properties.InvalidPropertyGroupError) deprecated +route properties/update(file_properties.UpdatePropertiesArg, Void, file_properties.UpdatePropertiesError) deprecated +route properties/remove(file_properties.RemovePropertiesArg, Void, file_properties.RemovePropertiesError) deprecated +route properties/template/get(file_properties.GetTemplateArg, file_properties.GetTemplateResult, file_properties.TemplateError) deprecated +route properties/template/list(Void, file_properties.ListTemplateResult, file_properties.TemplateError) deprecated +route lock_file_batch (LockFileBatchArg, LockFileBatchResult, LockFileError) +route unlock_file_batch (UnlockFileBatchArg, LockFileBatchResult, LockFileError) +route get_file_lock_batch (LockFileBatchArg, LockFileBatchResult, LockFileError) +route paper/create (PaperCreateArg, PaperCreateResult, PaperCreateError) +route paper/update (PaperUpdateArg, PaperUpdateResult, PaperUpdateError) diff --git a/providers/dropbox/testdata/dropbox-files-ff540e4a.stone b/providers/dropbox/testdata/dropbox-files-ff540e4a.stone new file mode 100644 index 0000000..ea72900 --- /dev/null +++ b/providers/dropbox/testdata/dropbox-files-ff540e4a.stone @@ -0,0 +1,52 @@ +namespace files +route get_metadata (GetMetadataArg, Metadata, GetMetadataError) +route list_folder/longpoll (ListFolderLongpollArg, ListFolderLongpollResult, ListFolderLongpollError) +route list_folder (ListFolderArg, ListFolderResult, ListFolderError) +route list_folder/continue (ListFolderContinueArg, ListFolderResult, ListFolderContinueError) +route list_folder/get_latest_cursor (ListFolderArg, ListFolderGetLatestCursorResult, ListFolderError) +route download (DownloadArg, FileMetadata, DownloadError) +route download_zip (DownloadZipArg, DownloadZipResult, DownloadZipError) +route upload_session/start (UploadSessionStartArg, UploadSessionStartResult, Void) +route upload_session/append:2 (UploadSessionAppendArg, Void, UploadSessionLookupError) +route upload_session/append (UploadSessionCursor, Void, UploadSessionLookupError) deprecated by upload_session/append:2 +route upload_session/finish (UploadSessionFinishArg, FileMetadata, UploadSessionFinishError) +route upload (CommitInfo, FileMetadata, UploadError) +route upload_session/finish_batch (UploadSessionFinishBatchArg, UploadSessionFinishBatchLaunch, Void) +route upload_session/finish_batch/check(async.PollArg, UploadSessionFinishBatchJobStatus, async.PollError) +route search (SearchArg, SearchResult, SearchError) +route create_folder:2 (CreateFolderArg, CreateFolderResult, CreateFolderError) +route create_folder (CreateFolderArg, FolderMetadata, CreateFolderError) deprecated by create_folder:2 +route create_folder_batch (CreateFolderBatchArg, CreateFolderBatchLaunch, Void) +route create_folder_batch/check (async.PollArg, CreateFolderBatchJobStatus, async.PollError) +route delete:2 (DeleteArg, DeleteResult, DeleteError) +route delete (DeleteArg, Metadata, DeleteError) deprecated by delete:2 +route delete_batch (DeleteBatchArg, DeleteBatchLaunch, Void) +route delete_batch/check (async.PollArg, DeleteBatchJobStatus, async.PollError) +route permanently_delete (DeleteArg, Void, DeleteError) +route copy:2 (RelocationArg, RelocationResult, RelocationError) +route copy (RelocationArg, Metadata, RelocationError) deprecated by copy:2 +route copy_batch (RelocationBatchArg, RelocationBatchLaunch, Void) +route copy_batch/check(async.PollArg, RelocationBatchJobStatus, async.PollError) +route move:2 (RelocationArg, RelocationResult, RelocationError) +route move (RelocationArg, Metadata, RelocationError) deprecated by move:2 +route move_batch (RelocationBatchArg, RelocationBatchLaunch, Void) +route move_batch/check(async.PollArg, RelocationBatchJobStatus, async.PollError) +route get_thumbnail(ThumbnailArg, FileMetadata, ThumbnailError) +route get_thumbnail_batch(GetThumbnailBatchArg, GetThumbnailBatchResult, GetThumbnailBatchError) +route get_preview(PreviewArg, FileMetadata, PreviewError) +route list_revisions(ListRevisionsArg, ListRevisionsResult, ListRevisionsError) +route restore(RestoreArg, FileMetadata, RestoreError) +route get_temporary_link(GetTemporaryLinkArg, GetTemporaryLinkResult, GetTemporaryLinkError) +route get_temporary_upload_link(GetTemporaryUploadLinkArg, GetTemporaryUploadLinkResult, Void) +route copy_reference/get(GetCopyReferenceArg, GetCopyReferenceResult, GetCopyReferenceError) +route copy_reference/save(SaveCopyReferenceArg, SaveCopyReferenceResult, SaveCopyReferenceError) +route save_url(SaveUrlArg, SaveUrlResult, SaveUrlError) +route save_url/check_job_status(async.PollArg, SaveUrlJobStatus, async.PollError) +route alpha/get_metadata (AlphaGetMetadataArg, Metadata, AlphaGetMetadataError) deprecated by get_metadata +route alpha/upload (CommitInfoWithProperties, FileMetadata, UploadErrorWithProperties) deprecated by alpha/upload +route properties/add(file_properties.AddPropertiesArg, Void, file_properties.AddPropertiesError) deprecated +route properties/overwrite(file_properties.OverwritePropertyGroupArg, Void, file_properties.InvalidPropertyGroupError) deprecated +route properties/update(file_properties.UpdatePropertiesArg, Void, file_properties.UpdatePropertiesError) deprecated +route properties/remove(file_properties.RemovePropertiesArg, Void, file_properties.RemovePropertiesError) deprecated +route properties/template/get(file_properties.GetTemplateArg, file_properties.GetTemplateResult, file_properties.TemplateError) deprecated +route properties/template/list(Void, file_properties.ListTemplateResult, file_properties.TemplateError) deprecated diff --git a/providers/dropbox/testdata/dropbox-spec-listing-222ba8c0.json b/providers/dropbox/testdata/dropbox-spec-listing-222ba8c0.json new file mode 100644 index 0000000..7a84de5 --- /dev/null +++ b/providers/dropbox/testdata/dropbox-spec-listing-222ba8c0.json @@ -0,0 +1,7 @@ +[ + { + "name": "files.stone", + "path": "files.stone", + "type": "file" + } +] diff --git a/providers/dropbox/testdata/dropbox-spec-listing-6c68656c.json b/providers/dropbox/testdata/dropbox-spec-listing-6c68656c.json new file mode 100644 index 0000000..7a84de5 --- /dev/null +++ b/providers/dropbox/testdata/dropbox-spec-listing-6c68656c.json @@ -0,0 +1,7 @@ +[ + { + "name": "files.stone", + "path": "files.stone", + "type": "file" + } +] diff --git a/providers/dropbox/testdata/dropbox-spec-listing-c8364404.json b/providers/dropbox/testdata/dropbox-spec-listing-c8364404.json new file mode 100644 index 0000000..788ee04 --- /dev/null +++ b/providers/dropbox/testdata/dropbox-spec-listing-c8364404.json @@ -0,0 +1,12 @@ +[ + { + "name": "file_tagging.stone", + "path": "file_tagging.stone", + "type": "file" + }, + { + "name": "files.stone", + "path": "files.stone", + "type": "file" + } +] diff --git a/providers/dropbox/testdata/golden/dropbox-files-api.json b/providers/dropbox/testdata/golden/dropbox-files-api.json new file mode 100644 index 0000000..bbb30f1 --- /dev/null +++ b/providers/dropbox/testdata/golden/dropbox-files-api.json @@ -0,0 +1,78 @@ +[ + { + "id": 1, + "fingerprint": "sha256:c08a38dda8f324e40606d9f604492910322bbeba2d4c435d403a671bad1bf3ae", + "api": "dropbox/files-api", + "version": "2026-05-12", + "previous_version": "2023-04-26", + "change": "breaking", + "subject": { + "type": "api_operation", + "kind": "operation", + "side": "request", + "operation": "POST /2/files/properties/remove" + }, + "description": "Dropbox's properties/remove route is gone from its API spec (it was there as of 2023-04-26): calling it fails.", + "source_url": "https://raw.githubusercontent.com/dropbox/dropbox-api-spec/c8364404953d875801d496a81f786c5545f78223/files.stone", + "source_excerpt": "route properties/remove(file_properties.RemovePropertiesArg, Void, file_properties.RemovePropertiesError) deprecated", + "confidence": 1, + "detected_at": "2026-11-14T12:00:00Z" + }, + { + "id": 2, + "fingerprint": "sha256:cd56e1da62da5efcf3fe954a04bb4533b01d5dfa8d49b61ae01e90e98258833b", + "api": "dropbox/files-api", + "version": "2026-05-12", + "previous_version": "2023-04-26", + "change": "breaking", + "subject": { + "type": "api_operation", + "kind": "operation", + "side": "request", + "operation": "POST /2/files/properties/template/get" + }, + "description": "Dropbox's properties/template/get route is gone from its API spec (it was there as of 2023-04-26): calling it fails.", + "source_url": "https://raw.githubusercontent.com/dropbox/dropbox-api-spec/c8364404953d875801d496a81f786c5545f78223/files.stone", + "source_excerpt": "route properties/template/get(file_properties.GetTemplateArg, file_properties.GetTemplateResult, file_properties.TemplateError) deprecated", + "confidence": 1, + "detected_at": "2026-11-14T12:00:00Z" + }, + { + "id": 3, + "fingerprint": "sha256:913e00cf6a07683a768683098cc4dba916e8b00d65de23df354f03e96473a16e", + "api": "dropbox/files-api", + "version": "2026-05-12", + "previous_version": "2023-04-26", + "change": "breaking", + "subject": { + "type": "api_operation", + "kind": "operation", + "side": "request", + "operation": "POST /2/files/properties/template/list" + }, + "description": "Dropbox's properties/template/list route is gone from its API spec (it was there as of 2023-04-26): calling it fails.", + "source_url": "https://raw.githubusercontent.com/dropbox/dropbox-api-spec/c8364404953d875801d496a81f786c5545f78223/files.stone", + "source_excerpt": "route properties/template/list(Void, file_properties.ListTemplateResult, file_properties.TemplateError) deprecated", + "confidence": 1, + "detected_at": "2026-11-14T12:00:00Z" + }, + { + "id": 4, + "fingerprint": "sha256:2064dc3fc1dede9aff9d807ba6acbee82ecbdbab942c7bfcbdebdcc57632bd8a", + "api": "dropbox/files-api", + "version": "2026-05-12", + "previous_version": "2023-04-26", + "change": "added", + "subject": { + "type": "api_operation", + "kind": "operation", + "side": "request", + "operation": "POST /2/files/upload_session/append_batch" + }, + "description": "Dropbox's upload_session/append_batch route is new in its API spec (it wasn't there as of 2023-04-26).", + "source_url": "https://raw.githubusercontent.com/dropbox/dropbox-api-spec/6c68656caafdff65a30943fe186a1800b9f35bbc/files.stone", + "source_excerpt": "route upload_session/append_batch (UploadSessionAppendBatchArg, UploadSessionAppendBatchResult, UploadSessionAppendBatchError)", + "confidence": 1, + "detected_at": "2026-11-14T12:00:00Z" + } +] diff --git a/providers/dropbox/testdata/golden/dropbox-python-surface.json b/providers/dropbox/testdata/golden/dropbox-python-surface.json new file mode 100644 index 0000000..0241361 --- /dev/null +++ b/providers/dropbox/testdata/golden/dropbox-python-surface.json @@ -0,0 +1,25 @@ +[ + { + "id": 1, + "fingerprint": "sha256:ac146b4c1ef739a61a7f4a3b24da3c47ce6c990e457fe597ae753cd3744ae85c", + "api": "dropbox/python-surface", + "version": "12.2.4", + "previous_version": "12.2.3", + "change": "breaking", + "subject": { + "type": "package_release", + "ecosystem": "pypi", + "package": "dropbox", + "change": "removed_symbol", + "symbols": [ + "base.DropboxBase.sharing_remove_file_member" + ] + }, + "description": "The method `base.DropboxBase.sharing_remove_file_member` was removed in dropbox 12.2.4: code using it fails.", + "migration_hint": "dropbox 12.2.4 has no `base.DropboxBase.sharing_remove_file_member`: see the package's release notes for what replaces it.", + "source_url": "https://files.pythonhosted.org/packages/3e/c3/442b4dd1360c5d4a3b146de0732949c71527fd5282ef7a1e7711cd27037d/dropbox-12.2.4-py3-none-any.whl", + "source_excerpt": "dropbox 12.2.3 (dropbox-12.2.3-py3-none-any.whl), dropbox/base.py line 6054: def sharing_remove_file_member(self, file, member)\ndropbox 12.2.4 (dropbox-12.2.4-py3-none-any.whl): not defined", + "confidence": 1, + "detected_at": "2026-11-14T12:00:00Z" + } +] diff --git a/providers/dropbox/testdata/pypi/dropbox/dropbox-12.2.0-py3-none-any.trimmed.whl b/providers/dropbox/testdata/pypi/dropbox/dropbox-12.2.0-py3-none-any.trimmed.whl new file mode 100644 index 0000000..5b88b71 Binary files /dev/null and b/providers/dropbox/testdata/pypi/dropbox/dropbox-12.2.0-py3-none-any.trimmed.whl differ diff --git a/providers/dropbox/testdata/pypi/dropbox/dropbox-12.2.1-py3-none-any.trimmed.whl b/providers/dropbox/testdata/pypi/dropbox/dropbox-12.2.1-py3-none-any.trimmed.whl new file mode 100644 index 0000000..b3ef900 Binary files /dev/null and b/providers/dropbox/testdata/pypi/dropbox/dropbox-12.2.1-py3-none-any.trimmed.whl differ diff --git a/providers/dropbox/testdata/pypi/dropbox/dropbox-12.2.3-py3-none-any.trimmed.whl b/providers/dropbox/testdata/pypi/dropbox/dropbox-12.2.3-py3-none-any.trimmed.whl new file mode 100644 index 0000000..0f8dbb4 Binary files /dev/null and b/providers/dropbox/testdata/pypi/dropbox/dropbox-12.2.3-py3-none-any.trimmed.whl differ diff --git a/providers/dropbox/testdata/pypi/dropbox/dropbox-12.2.4-py3-none-any.trimmed.whl b/providers/dropbox/testdata/pypi/dropbox/dropbox-12.2.4-py3-none-any.trimmed.whl new file mode 100644 index 0000000..0071d0b Binary files /dev/null and b/providers/dropbox/testdata/pypi/dropbox/dropbox-12.2.4-py3-none-any.trimmed.whl differ diff --git a/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-12.2.0.json b/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-12.2.0.json new file mode 100644 index 0000000..8b9eca6 --- /dev/null +++ b/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-12.2.0.json @@ -0,0 +1,20 @@ +{ + "info": { + "name": "dropbox", + "version": "12.2.0" + }, + "urls": [ + { + "filename": "dropbox-12.2.0-py3-none-any.whl", + "packagetype": "bdist_wheel", + "url": "https://files.pythonhosted.org/packages/03/52/a9deb96572656bd773955be3b86e58ce7488a883cc8b56ae09f3f07e6437/dropbox-12.2.0-py3-none-any.whl", + "yanked": false + }, + { + "filename": "dropbox-12.2.0.tar.gz", + "packagetype": "sdist", + "url": "https://files.pythonhosted.org/packages/ca/59/f60393a8972b806625c829f7066e2ab42a8f4e8c13310595c2b7c8279ee0/dropbox-12.2.0.tar.gz", + "yanked": false + } + ] +} diff --git a/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-12.2.1.json b/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-12.2.1.json new file mode 100644 index 0000000..0e99ce1 --- /dev/null +++ b/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-12.2.1.json @@ -0,0 +1,20 @@ +{ + "info": { + "name": "dropbox", + "version": "12.2.1" + }, + "urls": [ + { + "filename": "dropbox-12.2.1-py3-none-any.whl", + "packagetype": "bdist_wheel", + "url": "https://files.pythonhosted.org/packages/f4/8d/4dfdb50aa7378cfe8be2820ed375d840340a9dfb4971e76c780883c860d5/dropbox-12.2.1-py3-none-any.whl", + "yanked": false + }, + { + "filename": "dropbox-12.2.1.tar.gz", + "packagetype": "sdist", + "url": "https://files.pythonhosted.org/packages/b0/2c/08c98e1d818c07ed051b917c674f755402692af9683c106fedab7e8bb9b3/dropbox-12.2.1.tar.gz", + "yanked": false + } + ] +} diff --git a/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-12.2.3.json b/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-12.2.3.json new file mode 100644 index 0000000..9459949 --- /dev/null +++ b/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-12.2.3.json @@ -0,0 +1,20 @@ +{ + "info": { + "name": "dropbox", + "version": "12.2.3" + }, + "urls": [ + { + "filename": "dropbox-12.2.3-py3-none-any.whl", + "packagetype": "bdist_wheel", + "url": "https://files.pythonhosted.org/packages/de/01/c8cb45346fd2df249d6f6a311ec25cd84c37c8f549f5f204d09586a1debf/dropbox-12.2.3-py3-none-any.whl", + "yanked": false + }, + { + "filename": "dropbox-12.2.3.tar.gz", + "packagetype": "sdist", + "url": "https://files.pythonhosted.org/packages/f4/ec/26d1a23f0c155f6783fe1278d3a1e6c8e8802cada778039006d8b7942459/dropbox-12.2.3.tar.gz", + "yanked": false + } + ] +} diff --git a/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-12.2.4.json b/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-12.2.4.json new file mode 100644 index 0000000..3c01aee --- /dev/null +++ b/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-12.2.4.json @@ -0,0 +1,20 @@ +{ + "info": { + "name": "dropbox", + "version": "12.2.4" + }, + "urls": [ + { + "filename": "dropbox-12.2.4-py3-none-any.whl", + "packagetype": "bdist_wheel", + "url": "https://files.pythonhosted.org/packages/3e/c3/442b4dd1360c5d4a3b146de0732949c71527fd5282ef7a1e7711cd27037d/dropbox-12.2.4-py3-none-any.whl", + "yanked": false + }, + { + "filename": "dropbox-12.2.4.tar.gz", + "packagetype": "sdist", + "url": "https://files.pythonhosted.org/packages/38/cc/6b70cf03321807c3894e6daa583cb3c9fa4a2ed9c15f94946aed0d3ea096/dropbox-12.2.4.tar.gz", + "yanked": false + } + ] +} diff --git a/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-excerpt.json b/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-excerpt.json new file mode 100644 index 0000000..29737fc --- /dev/null +++ b/providers/dropbox/testdata/pypi/dropbox/pypi-dropbox-excerpt.json @@ -0,0 +1,63 @@ +{ + "info": { + "name": "dropbox" + }, + "releases": { + "12.2.0": [ + { + "filename": "dropbox-12.2.0-py3-none-any.whl", + "packagetype": "bdist_wheel", + "upload_time_iso_8601": "2026-07-14T04:58:01.393052Z", + "yanked": false + }, + { + "filename": "dropbox-12.2.0.tar.gz", + "packagetype": "sdist", + "upload_time_iso_8601": "2026-07-14T04:58:03.012845Z", + "yanked": false + } + ], + "12.2.1": [ + { + "filename": "dropbox-12.2.1-py3-none-any.whl", + "packagetype": "bdist_wheel", + "upload_time_iso_8601": "2026-07-20T16:43:19.115255Z", + "yanked": false + }, + { + "filename": "dropbox-12.2.1.tar.gz", + "packagetype": "sdist", + "upload_time_iso_8601": "2026-07-20T16:43:20.627241Z", + "yanked": false + } + ], + "12.2.3": [ + { + "filename": "dropbox-12.2.3-py3-none-any.whl", + "packagetype": "bdist_wheel", + "upload_time_iso_8601": "2026-10-07T17:55:31.653723Z", + "yanked": false + }, + { + "filename": "dropbox-12.2.3.tar.gz", + "packagetype": "sdist", + "upload_time_iso_8601": "2026-10-07T17:55:33.443787Z", + "yanked": false + } + ], + "12.2.4": [ + { + "filename": "dropbox-12.2.4-py3-none-any.whl", + "packagetype": "bdist_wheel", + "upload_time_iso_8601": "2026-10-22T16:07:41.747132Z", + "yanked": false + }, + { + "filename": "dropbox-12.2.4.tar.gz", + "packagetype": "sdist", + "upload_time_iso_8601": "2026-10-22T16:07:43.394535Z", + "yanked": false + } + ] + } +}