@rippling/rippling-sdk 0.2.0-alpha.108 → 0.2.0-alpha.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/lib/charts/builders.d.mts +18 -19
- package/lib/charts/builders.d.mts.map +1 -1
- package/lib/charts/builders.d.ts +18 -19
- package/lib/charts/builders.d.ts.map +1 -1
- package/lib/charts/builders.js +35 -28
- package/lib/charts/builders.js.map +1 -1
- package/lib/charts/builders.mjs +35 -28
- package/lib/charts/builders.mjs.map +1 -1
- package/lib/charts/describe.d.mts +6 -7
- package/lib/charts/describe.d.mts.map +1 -1
- package/lib/charts/describe.d.ts +6 -7
- package/lib/charts/describe.d.ts.map +1 -1
- package/lib/charts/describe.js +26 -27
- package/lib/charts/describe.js.map +1 -1
- package/lib/charts/describe.mjs +27 -28
- package/lib/charts/describe.mjs.map +1 -1
- package/lib/charts/errors.d.mts +2 -6
- package/lib/charts/errors.d.mts.map +1 -1
- package/lib/charts/errors.d.ts +2 -6
- package/lib/charts/errors.d.ts.map +1 -1
- package/lib/charts/errors.js +2 -6
- package/lib/charts/errors.js.map +1 -1
- package/lib/charts/errors.mjs +2 -6
- package/lib/charts/errors.mjs.map +1 -1
- package/lib/charts/evaluate.d.mts +5 -7
- package/lib/charts/evaluate.d.mts.map +1 -1
- package/lib/charts/evaluate.d.ts +5 -7
- package/lib/charts/evaluate.d.ts.map +1 -1
- package/lib/charts/evaluate.js +21 -35
- package/lib/charts/evaluate.js.map +1 -1
- package/lib/charts/evaluate.mjs +22 -36
- package/lib/charts/evaluate.mjs.map +1 -1
- package/lib/charts/schema.d.mts +8 -97
- package/lib/charts/schema.d.mts.map +1 -1
- package/lib/charts/schema.d.ts +8 -97
- package/lib/charts/schema.d.ts.map +1 -1
- package/lib/charts/schema.js +186 -65
- package/lib/charts/schema.js.map +1 -1
- package/lib/charts/schema.mjs +185 -65
- package/lib/charts/schema.mjs.map +1 -1
- package/lib/charts/types.d.mts +40 -25
- package/lib/charts/types.d.mts.map +1 -1
- package/lib/charts/types.d.ts +40 -25
- package/lib/charts/types.d.ts.map +1 -1
- package/lib/charts/types.js +8 -10
- package/lib/charts/types.js.map +1 -1
- package/lib/charts/types.mjs +8 -10
- package/lib/charts/types.mjs.map +1 -1
- package/lib/charts/visualization-grammar.d.mts +66 -0
- package/lib/charts/visualization-grammar.d.mts.map +1 -0
- package/lib/charts/visualization-grammar.d.ts +66 -0
- package/lib/charts/visualization-grammar.d.ts.map +1 -0
- package/lib/charts/visualization-grammar.js +70 -0
- package/lib/charts/visualization-grammar.js.map +1 -0
- package/lib/charts/visualization-grammar.mjs +67 -0
- package/lib/charts/visualization-grammar.mjs.map +1 -0
- package/lib/charts/vocabulary.d.mts +7 -0
- package/lib/charts/vocabulary.d.mts.map +1 -0
- package/lib/charts/vocabulary.d.ts +7 -0
- package/lib/charts/vocabulary.d.ts.map +1 -0
- package/lib/charts/vocabulary.js +10 -0
- package/lib/charts/vocabulary.js.map +1 -0
- package/lib/charts/vocabulary.mjs +7 -0
- package/lib/charts/vocabulary.mjs.map +1 -0
- package/lib/charts.d.mts +3 -3
- package/lib/charts.d.mts.map +1 -1
- package/lib/charts.d.ts +3 -3
- package/lib/charts.d.ts.map +1 -1
- package/lib/charts.js +2 -1
- package/lib/charts.js.map +1 -1
- package/lib/charts.mjs +1 -1
- package/lib/charts.mjs.map +1 -1
- package/package.json +4 -2
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/reimbursements.d.mts +1 -1
- package/resources/reimbursements.d.ts +1 -1
- package/resources/reimbursements.js +1 -1
- package/resources/reimbursements.mjs +1 -1
- package/resources/spend-categories.d.mts +140 -0
- package/resources/spend-categories.d.mts.map +1 -0
- package/resources/spend-categories.d.ts +140 -0
- package/resources/spend-categories.d.ts.map +1 -0
- package/resources/spend-categories.js +83 -0
- package/resources/spend-categories.js.map +1 -0
- package/resources/spend-categories.mjs +79 -0
- package/resources/spend-categories.mjs.map +1 -0
- package/src/client.ts +17 -0
- package/src/lib/charts/README.md +35 -28
- package/src/lib/charts/agent-reference.md +73 -0
- package/src/lib/charts/builders.ts +51 -35
- package/src/lib/charts/capabilities.json +96 -0
- package/src/lib/charts/describe.ts +31 -29
- package/src/lib/charts/errors.ts +2 -6
- package/src/lib/charts/evaluate.ts +25 -38
- package/src/lib/charts/schema.ts +232 -66
- package/src/lib/charts/types.ts +42 -31
- package/src/lib/charts/visualization-grammar.ts +67 -0
- package/src/lib/charts/vocabulary.ts +7 -0
- package/src/lib/charts.ts +8 -1
- package/src/resources/index.ts +7 -0
- package/src/resources/reimbursements.ts +1 -1
- package/src/resources/spend-categories.ts +175 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/lib/charts/guards.d.mts +0 -15
- package/lib/charts/guards.d.mts.map +0 -1
- package/lib/charts/guards.d.ts +0 -15
- package/lib/charts/guards.d.ts.map +0 -1
- package/lib/charts/guards.js +0 -38
- package/lib/charts/guards.js.map +0 -1
- package/lib/charts/guards.mjs +0 -34
- package/lib/charts/guards.mjs.map +0 -1
- package/src/lib/charts/guards.ts +0 -42
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as BusinessPartnersAPI from "./business-partners.js";
|
|
3
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
4
|
+
import { PageCursorURL, PagePromise } from "../core/pagination.js";
|
|
5
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
6
|
+
export declare class SpendCategories extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* A list of spend categories.
|
|
9
|
+
*
|
|
10
|
+
* - Requires: `Internal Testing`
|
|
11
|
+
* - Filterable fields: `name`
|
|
12
|
+
* - Sortable fields: `id`, `created_at`, `updated_at`
|
|
13
|
+
*
|
|
14
|
+
* @example HTTP
|
|
15
|
+
* Representative request and response shapes.
|
|
16
|
+
* ```
|
|
17
|
+
* GET /spend-categories/?filter=filter&order_by=order_by&limit=50&cursor=cursor HTTP/1.1
|
|
18
|
+
* Host: rest.ripplingapis.com
|
|
19
|
+
* Accept: application/json
|
|
20
|
+
* Rippling-Api-Version: 2024-08-01
|
|
21
|
+
*
|
|
22
|
+
* HTTP/1.1 200 OK
|
|
23
|
+
* Content-Type: application/json
|
|
24
|
+
*
|
|
25
|
+
* {
|
|
26
|
+
* "__meta": {
|
|
27
|
+
* "redacted_fields": [
|
|
28
|
+
* {
|
|
29
|
+
* "name": "date_of_birth",
|
|
30
|
+
* "reason": "Insufficient entitlements"
|
|
31
|
+
* }
|
|
32
|
+
* ]
|
|
33
|
+
* },
|
|
34
|
+
* "results": [
|
|
35
|
+
* {
|
|
36
|
+
* "id": "string",
|
|
37
|
+
* "created_at": "string",
|
|
38
|
+
* "updated_at": "string",
|
|
39
|
+
* "name": "string",
|
|
40
|
+
* "active": false
|
|
41
|
+
* }
|
|
42
|
+
* ],
|
|
43
|
+
* "next_link": "string"
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
list(query?: SpendCategoryListParams | null | undefined, options?: RequestOptions): PagePromise<SpendCategoryListResponsesPageCursorURL, SpendCategoryListResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Retrieve a specific spend category
|
|
50
|
+
*
|
|
51
|
+
* @example HTTP
|
|
52
|
+
* Representative request and response shapes.
|
|
53
|
+
* ```
|
|
54
|
+
* GET /spend-categories/{id}/ HTTP/1.1
|
|
55
|
+
* Host: rest.ripplingapis.com
|
|
56
|
+
* Accept: application/json
|
|
57
|
+
* Rippling-Api-Version: 2024-08-01
|
|
58
|
+
*
|
|
59
|
+
* HTTP/1.1 200 OK
|
|
60
|
+
* Content-Type: application/json
|
|
61
|
+
*
|
|
62
|
+
* {
|
|
63
|
+
* "__meta": {
|
|
64
|
+
* "redacted_fields": [
|
|
65
|
+
* {}
|
|
66
|
+
* ]
|
|
67
|
+
* }
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<SpendCategoryRetrieveResponse>;
|
|
72
|
+
}
|
|
73
|
+
export type SpendCategoryListResponsesPageCursorURL = PageCursorURL<SpendCategoryListResponse>;
|
|
74
|
+
/**
|
|
75
|
+
* A Spend category used to classify transaction line items.
|
|
76
|
+
*
|
|
77
|
+
* Inactive categories are included so historical transactions can still resolve their category.
|
|
78
|
+
*/
|
|
79
|
+
export interface SpendCategoryListResponse {
|
|
80
|
+
/**
|
|
81
|
+
* Identifier field
|
|
82
|
+
*/
|
|
83
|
+
id: string;
|
|
84
|
+
/**
|
|
85
|
+
* Record creation date
|
|
86
|
+
*/
|
|
87
|
+
created_at: string;
|
|
88
|
+
/**
|
|
89
|
+
* Record update date
|
|
90
|
+
*/
|
|
91
|
+
updated_at: string;
|
|
92
|
+
/**
|
|
93
|
+
* Whether the category is active. Inactive categories remain available for
|
|
94
|
+
* historical references.
|
|
95
|
+
*/
|
|
96
|
+
active?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Name of the Spend category.
|
|
99
|
+
*/
|
|
100
|
+
name?: string;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Meta information for the response.
|
|
104
|
+
*/
|
|
105
|
+
export interface SpendCategoryRetrieveResponse extends BusinessPartnersAPI.Meta {
|
|
106
|
+
/**
|
|
107
|
+
* Identifier field
|
|
108
|
+
*/
|
|
109
|
+
id: string;
|
|
110
|
+
/**
|
|
111
|
+
* Record creation date
|
|
112
|
+
*/
|
|
113
|
+
created_at: string;
|
|
114
|
+
/**
|
|
115
|
+
* Record update date
|
|
116
|
+
*/
|
|
117
|
+
updated_at: string;
|
|
118
|
+
/**
|
|
119
|
+
* Whether the category is active. Inactive categories remain available for
|
|
120
|
+
* historical references.
|
|
121
|
+
*/
|
|
122
|
+
active?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Name of the Spend category.
|
|
125
|
+
*/
|
|
126
|
+
name?: string;
|
|
127
|
+
}
|
|
128
|
+
export interface SpendCategoryListParams {
|
|
129
|
+
cursor?: string;
|
|
130
|
+
filter?: string;
|
|
131
|
+
/**
|
|
132
|
+
* The maximum number of results to return. Defaults to 50. Maximum is 100.
|
|
133
|
+
*/
|
|
134
|
+
limit?: number;
|
|
135
|
+
order_by?: string;
|
|
136
|
+
}
|
|
137
|
+
export declare namespace SpendCategories {
|
|
138
|
+
export { type SpendCategoryListResponse as SpendCategoryListResponse, type SpendCategoryRetrieveResponse as SpendCategoryRetrieveResponse, type SpendCategoryListResponsesPageCursorURL as SpendCategoryListResponsesPageCursorURL, type SpendCategoryListParams as SpendCategoryListParams, };
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=spend-categories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spend-categories.d.ts","sourceRoot":"","sources":["../src/resources/spend-categories.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,mBAAmB,+BAA4B;AAC3D,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,8BAA2B;AAChE,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,eAAgB,SAAQ,WAAW;IAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,IAAI,CACF,KAAK,GAAE,uBAAuB,GAAG,IAAI,GAAG,SAAc,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,uCAAuC,EAAE,yBAAyB,CAAC;IAOlF;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;CAG1F;AAED,MAAM,MAAM,uCAAuC,GAAG,aAAa,CAAC,yBAAyB,CAAC,CAAC;AAE/F;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,mBAAmB,CAAC,IAAI;IAC7E;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,eAAe,CAAC;IACvC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,uCAAuC,IAAI,uCAAuC,EACvF,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SpendCategories = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class SpendCategories extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* A list of spend categories.
|
|
11
|
+
*
|
|
12
|
+
* - Requires: `Internal Testing`
|
|
13
|
+
* - Filterable fields: `name`
|
|
14
|
+
* - Sortable fields: `id`, `created_at`, `updated_at`
|
|
15
|
+
*
|
|
16
|
+
* @example HTTP
|
|
17
|
+
* Representative request and response shapes.
|
|
18
|
+
* ```
|
|
19
|
+
* GET /spend-categories/?filter=filter&order_by=order_by&limit=50&cursor=cursor HTTP/1.1
|
|
20
|
+
* Host: rest.ripplingapis.com
|
|
21
|
+
* Accept: application/json
|
|
22
|
+
* Rippling-Api-Version: 2024-08-01
|
|
23
|
+
*
|
|
24
|
+
* HTTP/1.1 200 OK
|
|
25
|
+
* Content-Type: application/json
|
|
26
|
+
*
|
|
27
|
+
* {
|
|
28
|
+
* "__meta": {
|
|
29
|
+
* "redacted_fields": [
|
|
30
|
+
* {
|
|
31
|
+
* "name": "date_of_birth",
|
|
32
|
+
* "reason": "Insufficient entitlements"
|
|
33
|
+
* }
|
|
34
|
+
* ]
|
|
35
|
+
* },
|
|
36
|
+
* "results": [
|
|
37
|
+
* {
|
|
38
|
+
* "id": "string",
|
|
39
|
+
* "created_at": "string",
|
|
40
|
+
* "updated_at": "string",
|
|
41
|
+
* "name": "string",
|
|
42
|
+
* "active": false
|
|
43
|
+
* }
|
|
44
|
+
* ],
|
|
45
|
+
* "next_link": "string"
|
|
46
|
+
* }
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
list(query = {}, options) {
|
|
50
|
+
return this._client.getAPIList('/spend-categories/', (pagination_1.PageCursorURL), {
|
|
51
|
+
query,
|
|
52
|
+
...options,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Retrieve a specific spend category
|
|
57
|
+
*
|
|
58
|
+
* @example HTTP
|
|
59
|
+
* Representative request and response shapes.
|
|
60
|
+
* ```
|
|
61
|
+
* GET /spend-categories/{id}/ HTTP/1.1
|
|
62
|
+
* Host: rest.ripplingapis.com
|
|
63
|
+
* Accept: application/json
|
|
64
|
+
* Rippling-Api-Version: 2024-08-01
|
|
65
|
+
*
|
|
66
|
+
* HTTP/1.1 200 OK
|
|
67
|
+
* Content-Type: application/json
|
|
68
|
+
*
|
|
69
|
+
* {
|
|
70
|
+
* "__meta": {
|
|
71
|
+
* "redacted_fields": [
|
|
72
|
+
* {}
|
|
73
|
+
* ]
|
|
74
|
+
* }
|
|
75
|
+
* }
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
retrieve(id, options) {
|
|
79
|
+
return this._client.get((0, path_1.path) `/spend-categories/${id}/`, options);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.SpendCategories = SpendCategories;
|
|
83
|
+
//# sourceMappingURL=spend-categories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spend-categories.js","sourceRoot":"","sources":["../src/resources/spend-categories.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAgE;AAEhE,oDAA8C;AAE9C,MAAa,eAAgB,SAAQ,sBAAW;IAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,IAAI,CACF,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAA,0BAAwC,CAAA,EAAE;YAC7F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;CACF;AA7ED,0CA6EC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { PageCursorURL } from "../core/pagination.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
export class SpendCategories extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* A list of spend categories.
|
|
8
|
+
*
|
|
9
|
+
* - Requires: `Internal Testing`
|
|
10
|
+
* - Filterable fields: `name`
|
|
11
|
+
* - Sortable fields: `id`, `created_at`, `updated_at`
|
|
12
|
+
*
|
|
13
|
+
* @example HTTP
|
|
14
|
+
* Representative request and response shapes.
|
|
15
|
+
* ```
|
|
16
|
+
* GET /spend-categories/?filter=filter&order_by=order_by&limit=50&cursor=cursor HTTP/1.1
|
|
17
|
+
* Host: rest.ripplingapis.com
|
|
18
|
+
* Accept: application/json
|
|
19
|
+
* Rippling-Api-Version: 2024-08-01
|
|
20
|
+
*
|
|
21
|
+
* HTTP/1.1 200 OK
|
|
22
|
+
* Content-Type: application/json
|
|
23
|
+
*
|
|
24
|
+
* {
|
|
25
|
+
* "__meta": {
|
|
26
|
+
* "redacted_fields": [
|
|
27
|
+
* {
|
|
28
|
+
* "name": "date_of_birth",
|
|
29
|
+
* "reason": "Insufficient entitlements"
|
|
30
|
+
* }
|
|
31
|
+
* ]
|
|
32
|
+
* },
|
|
33
|
+
* "results": [
|
|
34
|
+
* {
|
|
35
|
+
* "id": "string",
|
|
36
|
+
* "created_at": "string",
|
|
37
|
+
* "updated_at": "string",
|
|
38
|
+
* "name": "string",
|
|
39
|
+
* "active": false
|
|
40
|
+
* }
|
|
41
|
+
* ],
|
|
42
|
+
* "next_link": "string"
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
list(query = {}, options) {
|
|
47
|
+
return this._client.getAPIList('/spend-categories/', (PageCursorURL), {
|
|
48
|
+
query,
|
|
49
|
+
...options,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Retrieve a specific spend category
|
|
54
|
+
*
|
|
55
|
+
* @example HTTP
|
|
56
|
+
* Representative request and response shapes.
|
|
57
|
+
* ```
|
|
58
|
+
* GET /spend-categories/{id}/ HTTP/1.1
|
|
59
|
+
* Host: rest.ripplingapis.com
|
|
60
|
+
* Accept: application/json
|
|
61
|
+
* Rippling-Api-Version: 2024-08-01
|
|
62
|
+
*
|
|
63
|
+
* HTTP/1.1 200 OK
|
|
64
|
+
* Content-Type: application/json
|
|
65
|
+
*
|
|
66
|
+
* {
|
|
67
|
+
* "__meta": {
|
|
68
|
+
* "redacted_fields": [
|
|
69
|
+
* {}
|
|
70
|
+
* ]
|
|
71
|
+
* }
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
retrieve(id, options) {
|
|
76
|
+
return this._client.get(path `/spend-categories/${id}/`, options);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=spend-categories.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spend-categories.mjs","sourceRoot":"","sources":["../src/resources/spend-categories.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,aAAa,EAAe,+BAA2B;AAEhE,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,IAAI,CACF,QAAoD,EAAE,EACtD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAA,aAAwC,CAAA,EAAE;YAC7F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -609,6 +609,13 @@ import {
|
|
|
609
609
|
SoftwareDeploymentUpdateResponse,
|
|
610
610
|
SoftwareDeployments,
|
|
611
611
|
} from './resources/software-deployments';
|
|
612
|
+
import {
|
|
613
|
+
SpendCategories,
|
|
614
|
+
SpendCategoryListParams,
|
|
615
|
+
SpendCategoryListResponse,
|
|
616
|
+
SpendCategoryListResponsesPageCursorURL,
|
|
617
|
+
SpendCategoryRetrieveResponse,
|
|
618
|
+
} from './resources/spend-categories';
|
|
612
619
|
import { SSOMe, SSOMeListParams, SSOMeResource } from './resources/sso-me';
|
|
613
620
|
import {
|
|
614
621
|
Team,
|
|
@@ -1936,6 +1943,7 @@ export class RipplingSDK {
|
|
|
1936
1943
|
* Software deployed to company devices
|
|
1937
1944
|
*/
|
|
1938
1945
|
softwareDeployments: API.SoftwareDeployments = new API.SoftwareDeployments(this);
|
|
1946
|
+
spendCategories: API.SpendCategories = new API.SpendCategories(this);
|
|
1939
1947
|
/**
|
|
1940
1948
|
* Job titles used by the company
|
|
1941
1949
|
*/
|
|
@@ -2087,6 +2095,7 @@ RipplingSDK.ScheduledJobAssignments = ScheduledJobAssignments;
|
|
|
2087
2095
|
RipplingSDK.Shiftassignments = Shiftassignments;
|
|
2088
2096
|
RipplingSDK.Sites = Sites;
|
|
2089
2097
|
RipplingSDK.SoftwareDeployments = SoftwareDeployments;
|
|
2098
|
+
RipplingSDK.SpendCategories = SpendCategories;
|
|
2090
2099
|
RipplingSDK.Titles = Titles;
|
|
2091
2100
|
RipplingSDK.Unassignedshifts = Unassignedshifts;
|
|
2092
2101
|
RipplingSDK.VariableCompensationPayouts = VariableCompensationPayouts;
|
|
@@ -2928,6 +2937,14 @@ export declare namespace RipplingSDK {
|
|
|
2928
2937
|
type SoftwareDeploymentUpdateParams as SoftwareDeploymentUpdateParams,
|
|
2929
2938
|
};
|
|
2930
2939
|
|
|
2940
|
+
export {
|
|
2941
|
+
SpendCategories as SpendCategories,
|
|
2942
|
+
type SpendCategoryListResponse as SpendCategoryListResponse,
|
|
2943
|
+
type SpendCategoryRetrieveResponse as SpendCategoryRetrieveResponse,
|
|
2944
|
+
type SpendCategoryListResponsesPageCursorURL as SpendCategoryListResponsesPageCursorURL,
|
|
2945
|
+
type SpendCategoryListParams as SpendCategoryListParams,
|
|
2946
|
+
};
|
|
2947
|
+
|
|
2931
2948
|
export {
|
|
2932
2949
|
Titles as Titles,
|
|
2933
2950
|
type TitleListResponse as TitleListResponse,
|
package/src/lib/charts/README.md
CHANGED
|
@@ -21,11 +21,10 @@ by comparing its value against a constant.
|
|
|
21
21
|
- **`value`** — this data point's plotted numeric value (a bar's height, a
|
|
22
22
|
point's y, a slice's amount). It is what the rule compares.
|
|
23
23
|
- **Comparisons** — `equals`, `isNot`, `lessThan`, `greaterThan`, `lessOrEqual`, `greaterOrEqual`.
|
|
24
|
-
- **`when(condition, ifTrue, ifFalse?)`** — a conditional
|
|
25
|
-
`ifFalse`
|
|
24
|
+
- **`when(condition, ifTrue, ifFalse?)`** — a conditional colour. Both results
|
|
25
|
+
are colour strings; `ifFalse` defaults to `null` (keep the chart default).
|
|
26
26
|
- **`color(rule)`** — target the colour channel. Wrapping `when(...)` in `color(...)`
|
|
27
|
-
is what says "this rule sets the colour"
|
|
28
|
-
so more channels (opacity, label visibility) are just more wrappers later.
|
|
27
|
+
is what says "this rule sets the colour".
|
|
29
28
|
- **`literal`** — bare constants (`100`, `'#E24B4A'`) are wrapped automatically.
|
|
30
29
|
|
|
31
30
|
```ts
|
|
@@ -46,7 +45,7 @@ Agent writes a rule with these builders (the only consumer that imports the SDK)
|
|
|
46
45
|
-> the placeholder is emitted into the chart option, like the {$fn} placeholders
|
|
47
46
|
a chart already emits, and crosses to the app as plain JSON
|
|
48
47
|
-> renderer resolves {$rule} against the point's value -> a colour, drawn
|
|
49
|
-
-> settings panel reads the same {$rule}
|
|
48
|
+
-> settings panel reads the same flat {$rule} value -> controls the user can edit
|
|
50
49
|
```
|
|
51
50
|
|
|
52
51
|
```json
|
|
@@ -64,28 +63,38 @@ Agent writes a rule with these builders (the only consumer that imports the SDK)
|
|
|
64
63
|
`channel: 'color'` says what the rule targets, so a reader sees it without
|
|
65
64
|
inferring from where it sits. `evaluate(rule, { value })` resolves it to a colour
|
|
66
65
|
for the renderer; `describe(rule)` turns it into the controls the settings panel
|
|
67
|
-
shows. Both accept the placeholder or
|
|
68
|
-
of a fixed set of kinds
|
|
69
|
-
|
|
66
|
+
shows. Both accept the placeholder or a bare node. A node can only ever be one
|
|
67
|
+
of a fixed set of kinds. `chartRuleSchema` is the executable Valibot schema for
|
|
68
|
+
that closed set, and `parseChartRule(unknown)` is the SDK-owned runtime boundary
|
|
69
|
+
for persisted or agent-authored JSON.
|
|
70
70
|
|
|
71
71
|
## How it is consumed
|
|
72
72
|
|
|
73
|
-
The
|
|
74
|
-
|
|
75
|
-
at render time. Two ways, and only the first is needed:
|
|
73
|
+
The rule crosses as data — a `{$rule}` placeholder alongside the `{$fn}` ones.
|
|
74
|
+
Consumers have two integration choices:
|
|
76
75
|
|
|
77
|
-
1. **
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
1. **Shared (preferred)** — import `evaluate`, `describe`, and
|
|
77
|
+
`parseChartRule` from the SDK. Parse once when the chart option is hydrated,
|
|
78
|
+
then pass that parsed value to `evaluate` for every datum. The parsed value is
|
|
79
|
+
an immutable validated clone, so repeated evaluation does not re-run schema
|
|
80
|
+
validation.
|
|
81
|
+
2. **Serialized contract** — another language/runtime may interpret the JSON
|
|
82
|
+
independently. It must maintain parity tests against SDK builder output and
|
|
83
|
+
fail closed when the package-level `capabilities.json` contract version is
|
|
84
|
+
unsupported or a serialized rule contains an unknown node kind. Individual
|
|
85
|
+
serialized rules do not carry a version field.
|
|
86
|
+
|
|
87
|
+
Valibot is a production dependency because validation executes in shipped SDK
|
|
88
|
+
code. Node and Deno npm consumers resolve it transitively from the package; it
|
|
89
|
+
is not duplicated in the agent reference or capability manifest.
|
|
82
90
|
|
|
83
91
|
## Where it is going
|
|
84
92
|
|
|
85
|
-
The vocabulary starts small on purpose
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
93
|
+
The vocabulary starts small on purpose. The v1 schema stays flat; features that
|
|
94
|
+
require nesting or a different expression shape must use a new contract version
|
|
95
|
+
rather than silently widening v1. A compatible channel or leaf addition still
|
|
96
|
+
requires one builder, evaluator case, description case, and schema entry.
|
|
97
|
+
Potential future versions may add:
|
|
89
98
|
|
|
90
99
|
- **More channels** — opacity, label visibility (`show`), and the like, added
|
|
91
100
|
alongside `channel: 'color'`.
|
|
@@ -104,11 +113,9 @@ with no change to charts already using it. Planned next, roughly in order:
|
|
|
104
113
|
|
|
105
114
|
## Safety
|
|
106
115
|
|
|
107
|
-
A rule is data, not code
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
Catch `ChartRuleError` — every failure mode is a subclass of it (`UnknownNodeError`,
|
|
114
|
-
`RuleTypeError`, `RuleDepthError`).
|
|
116
|
+
A rule is data, not code: its vocabulary has no callbacks, loops, or side
|
|
117
|
+
effects. The v1 schema is non-recursive, so rule input cannot create recursive
|
|
118
|
+
validation or evaluation work. Runtime parsing also rejects inherited rule
|
|
119
|
+
fields before Valibot reads them, preventing prototype data from supplying
|
|
120
|
+
operands. Malformed rules throw a `ChartRuleError`; callers can use that one
|
|
121
|
+
base class for every rule-specific failure.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Visualization grammar authoring reference
|
|
2
|
+
|
|
3
|
+
Use these builders only when a chart property must change according to the
|
|
4
|
+
current data point's numeric value. They produce JSON-safe rule data; they do not
|
|
5
|
+
execute callbacks or render a chart.
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
In the Deno TypeScript sandbox, import from the module specifier published in
|
|
10
|
+
`capabilities.json`:
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { color, greaterThan, value, when } from 'npm:@rippling/rippling-sdk/lib/charts';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Builders
|
|
17
|
+
|
|
18
|
+
- `value` reads the current data point's plotted numeric value.
|
|
19
|
+
- `literal(scalar)` explicitly creates a constant. Bare numbers, strings,
|
|
20
|
+
booleans, and `null` are converted to literals automatically.
|
|
21
|
+
- `equals(left, right)`, `isNot(left, right)`, `lessThan(left, right)`,
|
|
22
|
+
`greaterThan(left, right)`, `lessOrEqual(left, right)`, and
|
|
23
|
+
`greaterOrEqual(left, right)` return a condition.
|
|
24
|
+
- `when(condition, ifTrue, ifFalse?)` returns `ifTrue` when the condition is true
|
|
25
|
+
and `ifFalse` otherwise. Both results are colour strings; the omitted false
|
|
26
|
+
branch becomes `null` to preserve the chart's default colour.
|
|
27
|
+
- `color(when(...))` marks the conditional result as a color rule.
|
|
28
|
+
|
|
29
|
+
Example: highlight values over 20 and otherwise preserve the chart's default
|
|
30
|
+
color.
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
const conditionalColor = color(when(greaterThan(value, 20), '$token:categorical.series-5'));
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The builders return plain data that renderers and editors can read. Always use
|
|
37
|
+
the builders above. Do not hand-author the serialized `$rule` object shown here:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"channel": "color",
|
|
42
|
+
"$rule": {
|
|
43
|
+
"kind": "ifElse",
|
|
44
|
+
"cond": {
|
|
45
|
+
"kind": "greaterThan",
|
|
46
|
+
"left": { "kind": "value" },
|
|
47
|
+
"right": { "kind": "literal", "value": 20 }
|
|
48
|
+
},
|
|
49
|
+
"then": { "kind": "literal", "value": "$token:categorical.series-5" },
|
|
50
|
+
"else": { "kind": "literal", "value": null }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Current limits
|
|
56
|
+
|
|
57
|
+
The current contract supports only the `color` channel and per-point `value`.
|
|
58
|
+
It has one fixed, non-recursive shape: comparisons contain only `value` or
|
|
59
|
+
literal operands, and `when` contains one comparison plus two colour literals.
|
|
60
|
+
Do not place comparisons, `when(...)`, or `color(...)` inside another operand or
|
|
61
|
+
branch.
|
|
62
|
+
|
|
63
|
+
Rules do not calculate aggregates such as maximum, average, or percentile. Chart
|
|
64
|
+
code may calculate a finite scalar threshold from its data first and then use
|
|
65
|
+
that scalar in a rule. For example, after computing an 80th-percentile
|
|
66
|
+
`threshold`, use
|
|
67
|
+
`color(when(greaterOrEqual(value, threshold), highlightColor))` to highlight the
|
|
68
|
+
top 20%. The rule remains a per-point comparison; the surrounding chart code
|
|
69
|
+
owns the aggregate calculation.
|
|
70
|
+
|
|
71
|
+
Other data fields, compound boolean logic, opacity, label visibility, and other
|
|
72
|
+
output channels are not supported. Keep static colors as ordinary chart values
|
|
73
|
+
rather than wrapping them in rules.
|